Vue Formatter
Format the template and script sections of a Vue single-file component according to their syntax.
Understand the input and result
<template><button @click="count++">{{count}}</button></template>
<script setup>import {ref} from "vue";const count=ref(0);</script><template>
<button @click="count++">{{ count }}</button>
</template>
<script setup>
import { ref } from "vue";
const count = ref(0);
</script>Reading the result
Formats @click and {{count}} in template separately from ref(0) in script setup. A readable result does not mean that the button runs as an app inside this page.
Common mistakes
This does not mount a Vue app or verify reactivity and events. Project plugins and Prettier configuration files are not loaded.
Examples were checked against this tool's processing behavior. Review whether the meaning and format fit your own input.
Vue Formatter guide
How to use it
- Paste the input on the left or use Open file to load a UTF-8 text file. Provide the content to process, without unrelated logs, HTTP headers or explanations. For comparison, enter one JSON document in each input area.
- Choose the action and options in the middle and press Run. If an error appears, correct the original input and try again. You can edit input and options during processing; a result from an older input will not be applied to your new input.
- The original stays on the left and the result appears on the right. Use Copy or Download to take it to your next task. Editing input or options clears the previous result. Reset clears both areas while keeping your options. Structure views allow tree entries to be expanded and collapsed.
How it works and what to keep in mind
The output is text produced according to the selected representation rules. Syntax validity differs from business-rule validity; check requirements of the target application separately. Data-parsing operations reject integers that cannot be represented precisely. Use the original JSON formatter when raw numeric literals must be preserved.
Input and results are processed in your browser without being uploaded or saved. Open file accepts UTF-8 text files up to 2 MB. These tools handle syntax and data representation; they do not guarantee business-rule validity, security or production readiness. Language and theme changes preserve your current input and options, but reloading clears work data.
Use the header buttons to switch languages or light and dark modes instantly. Switching keeps your input, results and running state. Your language and theme choices also apply on later visits and when you navigate to another page.