Follow these steps:

  1. CTRL + SHIFT + P
  2. Format Document (in pop-up bar)
  3. Select Format Document
  4. Select Configure Default Formatter...
  5. Select Prettier - Code formatter

To enable Format On Save

  1. CTRL + SHIFT + P
  2. Preferences Open Settings (UI) (in pop-up bar)
  3. Type Format On Save
  4. Enable Format On Save if it is not checked

Done!

Answer from Yakupguly Malikov on Stack Overflow
🌐
Code Beautify
codebeautify.org › react-formatter
React Formatter Online
React Formatter helps to format any not formatted or ugly react script and helps to save and share the react script.
🌐
Prettier
prettier.io
Prettier · Opinionated Code Formatter · Prettier
An opinionated code formatter · Supports many languages · Integrates with most editors · Has few options » · Your code is formatted on save · No need to discuss style in code review · Saves you time and energy · And more » · JavaScript · JSX · Flow ·
People also ask

What is a code formatter?
A code formatter automatically rewrites source code to conform to a set of style rules without changing its functionality. It helps teams maintain a consistent coding style, making code easier to read and review.
🌐
codeshack.io
codeshack.io › home › tools › react formatter
React Formatter - Online JSX Beautifier & Prettifier
Will this tool fix my broken React code?
No, this is a formatter, not a debugger. It will not fix logic errors. However, it can help you find syntax errors, because the formatter will fail if the code is not syntactically correct.
🌐
codeshack.io
codeshack.io › home › tools › react formatter
React Formatter - Online JSX Beautifier & Prettifier
What is JSX and why does it need formatting?
JSX is a syntax extension for JavaScript that lets you write HTML-like code inside your JavaScript files. Because it mixes two syntaxes, it can become messy. A formatter applies consistent rules for indentation and line breaks to keep it clean and readable.
🌐
codeshack.io
codeshack.io › home › tools › react formatter
React Formatter - Online JSX Beautifier & Prettifier
🌐
ExtendsClass
extendsclass.com › react-formatter.html
React formatter online
This tool allows to beautify react source code online. There is no file size limit, and your files are not sent to server side (they remain in your browser). ... Click on "Beautify" button in order to format your code. Click on "Download" or "Copy to clipboard" buttons to retrieve your formatted ...
🌐
Holt
react-v9.holt.courses › lessons › tools › code-formatting
Code Formatting – Complete Intro to React
Learn how to maintain high code quality with Prettier by James Long, a powerful tool for consistent code formatting. Discover easy integration methods and how to use Prettier with Visual Studio Code to streamline your development process, as well as setup instructions for npm scripts in this guide from Brian Holt's Complete Intro to React course.
🌐
Javainuse
javainuse.com › react
Online React Code Formatter Tool
This code formatter can be used to quickly and easily format React code to ensure that it is written in the best possible way. It is an essential tool for making sure that your code is properly structured and styled.
Find elsewhere
🌐
Medium
rimazmohommed523.medium.com › react-102-configuring-code-formatting-using-prettier-eslint-husky-f207f1bcebed
React 102 : Configuring code formatting using Prettier, ESLint & Husky | by Rimaz Mohommed | Medium
July 14, 2023 - In this article I’ll be diving into setting up pettier, eslint and husky for configuting the code formatting rules for your react js…
🌐
DhiWise
dhiwise.com › post › react-code-formatting-made-easy-a-journey-with-prettier
Exploring the World of prettier: An Opinionated React Formatter
July 22, 2024 - That’s when I discovered the ... to format a React app with Prettier. ... Prettier is an opinionated code formatter that supports a variety of languages, including JavaScript, which is the backbone of any React ...
🌐
CodeShack
codeshack.io › home › tools › react formatter
React Formatter - Online JSX Beautifier & Prettifier
Easily format and beautify your React and JSX code online. Our free tool cleans up and indents messy components, making your code readable and consistent.
🌐
Text Cleaner
textcleaner.net › home › react formatter
React Formatter and Beautifier to format react online
December 2, 2025 - The best online React formatter tool to easily format and beautify your React code.
🌐
Codexize-Website
codexize.com › home › tools › react formatter
Free React Formatter Beautifier Viewer Validator Online
A React Formatter is a tool or software designed to automatically format and beautify React code, ensuring consistency and readability throughout a pr...
🌐
npm
npmjs.com › search
code prettify - npm search
A react component for making source-code snippets prettier.
🌐
W3 SpeedUp
w3speedup.com › home › react beautifier tool
React Beautifier Tool -Format React Code Online Clean & Optimize
May 1, 2025 - Code that’s hard to read can hide mistakes. Our React JS beautifier cleans up messy JSX and TSX. This makes it easier to spot errors and fix bugs. Our free React beautifier keeps your formatting the same.
🌐
Mdfaisal
mdfaisal.com › blog › how-to-add-linting-and-formatting-for-your-react-app
How to Add Linting and Formatting for your React App | Mohammad Faisal
January 19, 2021 - It is an opinionated code formatter. We can customize it to meet our needs. First, we need to install ESLint and Prettier. We will save these as dev dependencies because we don’t need them in production. If your application is scaffolded with create-react-app you don’t need to install eslint ...
🌐
Code Beautify
codebeautify.org › jsx-formatter
JSX Formatter and Beautifier Online
JSX Formatter helps to beautify JSX code, convert to human readable format and helps to save and share the JSX script. JSX is a JavaScript syntax extension. It is a programming language extension with XML-like syntaxes. for more info visit ...
🌐
npm
npmjs.com › package › react-formatter
react-formatter - npm
React component to Find & update the different text formats. Latest version: 1.0.3, last published: 7 years ago. Start using react-formatter in your project by running `npm i react-formatter`. There are no other projects in the npm registry using react-formatter.
      » npm install react-formatter
    
Published   Oct 10, 2018
Version   1.0.3
Author   Ahsan Bilal
🌐
Reactnativecoach
blog.reactnativecoach.com › format-code-style-with-prettier-in-react-native-1e10e6b7169f
Format Code Style with Prettier in React Native
Bringing you the best React Native, GraphQL, Redux, and Mobile Design resources from around the web. To submit stories for review or for inquiries about sponsorship: wyatt@reactnativecoach.com.
🌐
Medium
medium.com › react-native-training › prettier-for-react-native-776fe33b8d93
Prettier, for React Native. Let the code format itself | by Lorenzo 'kelset' Sciandra | React Native Training | Medium
May 21, 2017 - But I always had the feeling that ... in the poll: ... Plain and simple, prettier is a formatter that, when activated, will modify your code in order to keep its appearance consistent....