Skip to content
Marvin's Toolbox.

Search tools

Type to filter all tools

URL Encoder & Decoder

Encode text for use in URLs or decode percent-escaped strings back to readable text. Choose component, full-URL or form encoding, unwrap double-encoded strings, and break a URL into its parts with every query parameter decoded.

Everything runs locally in your browser. Your data never leaves your device.

Escapes every reserved character. Use for one value, like a query parameter or a single path segment.

URL breakdown

Paste a full URL above, like https://example.com/path?key=value, to see it split into protocol, host, port, path, query parameters and fragment.

Which characters get encoded

Unreserved, always safe

A-Za-z0-9-_.~

These never need escaping and every mode leaves them alone.

Reserved, they shape the URL

:/?#[]@!$&'()*+,;=

These give a URL its structure. Component and form mode escape them so they can sit inside a value without changing what the URL means. Full URL mode keeps them, which is why it is the right choice for encoding a complete address.

Everything else, including spaces, quotes and non-ASCII text, is written as one or more %XX escapes of its UTF-8 bytes in every mode.

Next steps

Send this tool's output straight into another tool.

Convert text into every case at once: title case in the APA, AP, Chicago, MLA, Bluebook, AMA and NYT styles, sentence case, upper, lower, camelCase, snake_case, kebab-case and more.

Count words, characters, sentences, paragraphs, lines and more as you type, with estimated reading and speaking time.

Remove duplicate lines from a list or text, keeping the first occurrence. Optionally ignore case and whitespace, or drop blank lines too.

Replace text in two modes: plain find and replace all, or regular expressions with flag controls and capture group references like $1.

Compare two texts and see every added, removed and changed line highlighted, side by side or inline, with the changed words marked within each line. Ignore case, whitespace or blank lines, read a summary of how much changed, and export the result as a unified diff.

Paste a UUID to see what it carries: version, variant, and for time-based versions the exact timestamp, clock sequence and node. Also shows the raw bytes, the 128-bit integer and the URN form.

Decode Base64 to text or encode text to Base64. Paste into the top box, read the result below, and flip the direction with one click. Handles Unicode correctly, reads URL-safe Base64, and shows binary payloads as a hex dump you can download.

Convert numbers between binary, octal, decimal, hexadecimal and any base up to 36. Type into any field and the others update as you go. Handles huge integers without losing precision and accepts 0x, 0b and 0o prefixes.

Convert between scientific notation and full numbers as you type. Reads 1.23e5, 1.23 × 10^5 and plain numbers, shows the value written out, in normalized scientific notation and in engineering notation, and can round to any number of significant digits.

About the URL Encoder & Decoder Tool

This tool converts text to and from percent encoding, the escaping scheme URLs use for characters they can't carry directly. Type or paste on one side and the result updates live, in both directions.

It also takes a full URL apart. Paste an address and it lists the protocol, host, port, path segments and fragment, plus every query parameter with its key and value decoded and ready to copy.

What you can do

  • Encode a query parameter or path segment so it is safe inside a URL.
  • Encode a whole URL without breaking its structure.
  • Encode and decode form data (application/x-www-form-urlencoded) with plus signs for spaces.
  • Decode a percent-encoded string back to readable text, including emoji and other Unicode.
  • Unwrap double-encoded strings with repeated decoding.
  • Split a URL into protocol, host, port, path, query parameters and fragment.

How to use the URL Encoder & Decoder

  1. 1Pick Encode or Decode.
  2. 2Choose the mode: Component for a single value, Full URL for a whole address, Form data for submitted form values.
  3. 3Type or paste your text. The result updates as you type and can be copied or downloaded.
  4. 4For a string that looks encoded twice, turn on repeated decoding and check how many passes it took.
  5. 5Paste a full URL to see it split into parts in the URL breakdown section.

Component, full URL or form encoding?

Component encoding escapes every reserved character, so the result is safe to drop into a query string or a path as one value. It matches JavaScript's encodeURIComponent.

Full URL encoding keeps :/?#&= and the other structural characters intact, which is what you want when the input already is a complete address and only the spaces and special characters inside it need escaping. It matches encodeURI.

Form encoding is application/x-www-form-urlencoded, the format browsers use to submit an HTML form. It works like component encoding except that a space becomes a + instead of %20, so decoding form data must turn plus signs back into spaces.

Forgiving decoding with exact error positions

Percent escapes are decoded byte by byte and joined back into UTF-8 text, so emoji and non-Latin scripts come out intact. When the input is malformed, a lone % or an escape without two hex digits, the tool names the exact character position instead of just refusing.

Strings that went through two rounds of encoding are a common sight in logs, tracking links and redirect chains. Turn on repeated decoding and the tool keeps applying decode passes until the text stops changing, then reports how many it needed. Text that travels inside URLs is sometimes wrapped as Base64 instead, which the Base64 Encoder & Decoder handles.

Reserved and unreserved characters

RFC 3986 splits characters into three groups. Unreserved characters (A-Z, a-z, 0-9, -, _, . and ~) never need escaping. Reserved characters give a URL its structure, so they are escaped inside values but kept when encoding a whole address. Everything else, including spaces and non-ASCII text, is always written as %XX escapes of its UTF-8 bytes.

The reference card below the panes lists both groups, and the mode you pick decides what happens to the reserved set.

Decode Base64 to text or encode text to Base64. Paste into the top box, read the result below, and flip the direction with one click. Handles Unicode correctly, reads URL-safe Base64, and shows binary payloads as a hex dump you can download.

Escape text into HTML entities or decode entities back to plain text. Choose named or numeric entities, escape only the unsafe characters or everything outside ASCII, and read the result live.

Paste anything that looks encoded and this tool works out what was used and undoes it, layer by layer. The whole BaseXX family from Base16 to Base85, binary, URL escapes, HTML entities, ROT13 and gzip, Brotli or Zstandard compression are detected in any combination, and every step of the chain is reported.

Turn any text into a clean URL slug. Transliterates accents and non-Latin scripts to ASCII, with options for the separator, letter case and a length limit. Handles many titles at once, one line per slug.

Escape or unescape a string for JSON, JavaScript, regex, shell, SQL, CSV, XML and more. Paste text, pick the target format and copy the result, in either direction.

Format code in JavaScript, TypeScript, JSON, JSON5, HTML, Vue, CSS, SCSS, LESS, Markdown, YAML, GraphQL, XML and SQL. Pick tabs or spaces, set the indent width, and format the input in place with one click.