Skip to main content
7B BusyBoss

Code Converters

Convert between code formats: HTML↔JSX, JSON↔TS/Go, cURL→fetch, SQL→JSON, query strings.

6 tools · sorted by popularity

Code converters that save a transcription, not a review

Each of these code converters takes something you already have, a block of HTML, a curl command, a JSON sample, a run of INSERT statements, a URL, and rewrites it into the form the next step needs. The rewrite is mechanical and runs in your browser. What none of them can do is know what you meant, so each page spells out the cases where the output needs a hand afterwards.

Markup and requests

HTML to JSX renames class to className and for to htmlFor, camelCases the SVG attributes React insists on, turns inline style strings into objects and self-closes the fifteen void elements. Event handlers such as onclick are left for you to rename, and HTML comments are removed. cURL to Fetch understands the method, header, body, basic-auth and URL flags, pretty-prints a JSON body, and silently drops any other flag, so read the result against the original. It also passes Cookie and User-Agent headers through even though a browser will refuse to send them.

Data into JSON

SQL INSERT to JSON parses INSERT statements only, in MySQL, PostgreSQL or SQL Server quoting, and turns NULL, numbers and booleans into real JSON types. Query String to JSON accepts a full URL or just the query, collects repeated keys into arrays, builds nested objects from PHP-style brackets like filters[year], and coerces values that look numeric, which turns 007 into 7.

JSON into types

JSON to TypeScript and JSON to Go Struct both infer from a single sample, which is the limit to keep in mind: an empty array becomes unknown[] in TypeScript, a whole number becomes int in Go even if production sends 5.5, and a field missing from the sample is not declared. Generate from the fullest response you can find, then mark optional fields and widen types by hand.