Skip to main content
>_devtools

Vue SFC Formatter

Format Vue single-file components with Prettier: template, script (JavaScript or TypeScript) and style blocks together.

How to use it

Format Vue single-file components with Prettier: template, script (JavaScript or TypeScript) and style blocks together. Paste or edit a Vue single-file component above; the formatted result updates as you type.

Example

Input: <script setup>const n=ref(0)</script><template>{{n}}</template>
Output: Prettier formats the script and template blocks with consistent indentation.

Limits and behavior

  • The tool formats syntax but does not type-check the component.
  • Input is limited to 1 MiB of UTF-8 text.