Code Formatter and Syntax Validator for Many Languages
Paste YAML, JSON5, TOML, GraphQL, Markdown, Handlebars, Dockerfile, SCSS, Java, PHP or TypeScript and get it formatted with syntax errors listed by line number.
- Free
- No sign-up
- Works on any device
About Code Formatter and Syntax Validator for Many Languages
The existing beautifier only handles HTML, CSS and JavaScript. This page covers eleven more: YAML, JSON5, TOML, GraphQL, Markdown, Handlebars, Dockerfile, SCSS, Java, PHP and TypeScript. YAML is parsed and rewritten with consistent indentation, JSON5 and TOML are parsed and their errors reported by line, GraphQL is pretty-printed, and the brace languages are re-indented by bracket depth. Each run lists syntax problems with line numbers, and you can choose to check only. Example: invalid YAML such as a: [1, 2 returns the line and reason.
How to use Code Formatter and Syntax Validator for Many Languages
- Choose the language and paste your code or configuration.
- Pick the indentation, and Format or Check only.
- Read the problems with line numbers, then copy or download the formatted result.
Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.
Also known as
Frequently asked questions
Does the formatter keep the comments in my YAML?
No. YAML is parsed and written back, and the parser does not keep comments, so the page warns you. Choose Check the syntax only to validate the YAML and keep your own text.
Is the syntax check as strict as a compiler?
No. It finds structural mistakes: bad YAML, JSON5 and TOML, unbalanced brackets, unclosed strings and comments, unknown Dockerfile instructions and mismatched Handlebars blocks. It does not check types or grammar for Java, PHP or TypeScript.
Why are Java, PHP and TypeScript only re-indented?
A safe full formatter needs a complete parser for each language. Re-indenting by bracket depth never changes the meaning of the code, so it is the part that can be done correctly in the browser.
Is Code Formatter and Syntax Validator for Many Languages free?
Yes. Code Formatter and Syntax Validator for Many Languages on Toolipedia is free to use, with no sign-up and no watermark.
Is it safe to use?
Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.
Does it work on my phone?
Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.
Do I need an account?
No. Just open the page and use the tool. There's no sign-up and no email needed.