Format anything

Paste anything. Formattr detects the format and formats it.

Runs locallyYour input is processed in this tab. The editor blocks outgoing network requests.
Input

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

  1. 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.
  2. A shortlist. Up to three formats that score at least 0.3 become candidates.
  3. 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.
  4. 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

FormatRecognized byFormatted with
JSONStarts with { or [, "key": pairsJSON Formatter
HTML<!doctype html>, void elements, class= attributesHTML Formatter
XML<?xml declaration or matching open and close tagsXML Formatter
YAMLkey: value lines, - list items, --- markersYAML Formatter
SQLLeading SELECT, INSERT, WITH, CREATE; FROM, WHERE, JOINSQL Formatter
CSSselector { property: value; } blocks, @mediaCSS Formatter
JavaScriptfunction, const, =>, importJavaScript Formatter
TypeScriptType annotations, interface, type aliasesTypeScript Formatter
Markdown# headings, lists with prose, [text](url) linksMarkdown Formatter
CSVA consistent delimiter count across three or more linesCSV to JSON
TOML[table] headers and key = value pairsTOML Formatter
GraphQLquery, mutation, fragment and selection setsGraphQL Formatter
Unix timestampA single 10- or 13-digit numberUnix Timestamp Converter
URLA single absolute URLURL Parser & Formatter
Plain textAnything elseText 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.