# Codeharbor Format & Check > Format JSON, CSS and HTML and find syntax errors in JSON, YAML, JavaScript and TypeScript. Paste code to re-indent JSON, CSS or HTML and to list syntax problems with line and column: JSON is parsed strictly, YAML with a documented subset parser, JavaScript and TypeScript with Codeharbor’s own tokenizer. Nothing is run. Part of usefulweb.site (https://usefulweb.site/). Part of [Codeharbor](https://codeharbor.usefulweb.site/) (ownerApp: codeharbor). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://codeharborformat.usefulweb.site/ (interactive tool at https://codeharborformat.usefulweb.site/tool) - JSON API: POST https://codeharborformat.usefulweb.site/api/v1/calculate with a JSON object of inputs (schema: https://codeharborformat.usefulweb.site/api/v1/tool) - OpenAPI: https://codeharborformat.usefulweb.site/openapi.json - MCP (Streamable HTTP): https://codeharborformat.usefulweb.site/mcp - tool `codeharbor_format` ## Inputs - code (textarea): Code - Paste the file content. - language (select): Language - fileName (text): File name (optional) - Used to pick the language when it is set to detect, e.g. config.yaml. - indent (select): Indentation ## Method - JSON: a strict RFC 8259 parser reports the first error with line and column (trailing commas, single quotes, comments and unclosed strings get their own messages) and warns about duplicate keys. Formatting keeps the key order and the exact spelling of numbers; short arrays of numbers stay on one line. - YAML: a subset parser (block mappings and sequences, quoted and plain scalars, one-line flow collections, block scalars, comments, several documents) reports tabs in indentation, lines indented more or less than their siblings, missing colons, mixed lists and mappings, unclosed quotes and duplicate keys. Anchors and tags are accepted but not resolved. - JavaScript/TypeScript: Codeharbor’s tokenizer finds unterminated strings, template literals, comments and regular expressions, unmatched or mismatched brackets, reserved words used as names and a few statement mistakes. TypeScript is first reduced to JavaScript by blanking its types (positions kept); enums, namespaces, decorators and parameter properties are reported as unsupported. This is not a full parser or a type checker. - CSS formatting puts one declaration per line inside indented rule blocks; HTML formatting places block elements on their own lines and indents children while keeping inline content,
and