Formatted output appears here. The detected format is shown above it.
The universal formatter is for when you do not know — or do not want to choose — which tool you need. Paste anything and Formattr recognizes the format, formats it with your saved settings, and offers the next step. Everything runs in your browser; nothing is uploaded.
How detection works
- Cheap signals. The first non-whitespace character, keyword hits and line-shape statistics produce a score for every format in under a millisecond. Only the first 64 KB is sampled.
- A shortlist. Up to three formats that score at least 0.3 become candidates.
- Parse confirmation. Each candidate is parsed with its real parser. A clean parse adds the most confidence; a parse that fails only at the very end (a truncated paste) adds a little.
- A decision. The highest score wins, with ties broken by a fixed priority order. Content that is clearly JSON but invalid — a trailing comma, say — is still treated as JSON, and the error is shown with its line and column.
Supported formats
| Format | Recognized by | Formatted with |
|---|---|---|
| JSON | Starts with { or [, "key": pairs | JSON Formatter |
| HTML | <!doctype html>, void elements, class= attributes | HTML Formatter |
| XML | <?xml declaration or matching open and close tags | XML Formatter |
| YAML | key: value lines, - list items, --- markers | YAML Formatter |
| SQL | Leading SELECT, INSERT, WITH, CREATE; FROM, WHERE, JOIN | SQL Formatter |
| CSS | selector { property: value; } blocks, @media | CSS Formatter |
| JavaScript | function, const, =>, import | JavaScript Formatter |
| TypeScript | Type annotations, interface, type aliases | TypeScript Formatter |
| Markdown | # headings, lists with prose, [text](url) links | Markdown Formatter |
| CSV | A consistent delimiter count across three or more lines | CSV to JSON |
| TOML | [table] headers and key = value pairs | TOML Formatter |
| GraphQL | query, mutation, fragment and selection sets | GraphQL Formatter |
| Unix timestamp | A single 10- or 13-digit number | Unix Timestamp Converter |
| URL | A single absolute URL | URL Parser & Formatter |
| Plain text | Anything else | Text Cleaner |
Privacy
Detection and formatting happen in a dedicated worker inside the workspace frame, which is served from a separate origin with a security policy that blocks network requests. The address bar stays /format — content never goes into the URL. The tab title shows only the detected format, for example “JSON · Formattr”. Read how the isolation works.
FAQ
How does Formattr know what I pasted?
It scores cheap signals first — the first character, keywords and the shape of the lines — then confirms the top candidates with the same parsers the individual tools use. A successful parse is the strongest signal, so a document that parses as JSON is treated as JSON even if it also looks like YAML.
What happens when detection is unsure?
Above 85% confidence the input is formatted immediately. Between 60% and 85% you see a suggestion to accept or change. Below that you choose from the top candidates or treat the input as plain text. The format pill is always a dropdown, so you can override the choice.
Is anything I paste sent to a server?
No. Detection and formatting run in a Web Worker inside an isolated frame whose security policy blocks outgoing network requests. The URL never contains your content, and the page title only shows the detected format name.
Can I switch to the dedicated tool?
Yes. “Open in dedicated tool” moves your content and settings to the matching tool page, such as the JSON Formatter, where every option and Next action for that format is available.