Skip to content
brownie.tools

URL Encoder / Decoder

Encode values, decode URL layers, or edit query parameters with four formats and line-by-line conversion.

For individual parameter values. Spaces become %20; URL separators are encoded.

URL parts

Enter a full URL in the input to inspect its parts and edit query parameters.

0 input UTF-16 code units

0 output UTF-16 code units · 0 percent-encoded bytes

Reuse the result to decode another layer, or switch direction to reverse the conversion.

Runs locally in your browser. Nothing is uploaded or sent to a server.

Paste text, choose Encode or Decode, and get percent-encoded text or its decoded value. Select Component for a parameter, Full URL to preserve separators, strict RFC 3986 for additional punctuation escaping, or Form value for spaces as +. One item per line converts batches while retaining line endings. URL parts lets you inspect a full URL and edit query parameters. Conversion runs locally without uploading your input; Use output as input processes another encoding layer.

Updated

How Do You Encode a Query Value Without Changing Its Meaning?

Select Encode, choose Component (encodeURIComponent), and enter tea & cake in Text to encode. The result is tea%20%26%20cake. In a query, assemble it as https://example.com/search?q=tea%20%26%20cake. The encoded ampersand belongs to q; an unescaped ampersand would introduce another field. Encode the value before adding the URL's separators, rather than applying Component to the entire assembled address.

Encoding the same value with each available format
Encoding formatOutput for tea & cakeMeaning
Componenttea%20%26%20cakeA single query value
Component (strict RFC 3986)tea%20%26%20cakeThe same result here; stricter punctuation rules
Full URLtea%20&%20cakeAmpersand retains its structural role
Form valuetea+%26+cakeA form value with plus-separated spaces

To check the round trip, click Use output as input, then select Decode with the same format. Component restores the original text. Encoding an already encoded value instead escapes its percent signs again: %20 becomes %2520. That extra layer is useful only when the receiving system expects it.

How Do You Choose Between a URL Component and a Full URL?

Percent encoding represents bytes with a percent sign and two hexadecimal digits. Its purpose is to keep data from being mistaken for URL syntax. The correct format depends on where the text belongs. A complete URL has structural separators, while a query parameter value may contain the same characters as ordinary data. Encoding those two inputs identically can change how a destination interprets the result.

Component mode uses encodeURIComponent. For example, the value red&size=large becomes red%26size%3Dlarge. The ampersand and equals sign remain part of that value instead of introducing another parameter. Full URL mode uses encodeURI, so https://example.com/a b?q=c d keeps its colon, slashes, question mark, and equals sign while encoding the spaces. It preserves existing structure; it does not validate the URL or infer which ampersands were intended as data.

What Does Strict RFC 3986 Encoding Change?

JavaScript's standard component encoder leaves letters, digits, hyphens, underscores, dots, tildes, and the punctuation !'()* unchanged. Strict RFC 3986 mode additionally percent-encodes those five punctuation characters. Its unchanged set is exactly letters, digits, -, _, ., and ~. This is useful when a protocol expects values escaped according to the RFC 3986 unreserved set. It is only an encoding step: the tool does not sort parameters, construct canonical requests, or sign them.

Non-ASCII text is represented using UTF-8. The letter é becomes %C3%A9, while 😀 becomes %F0%9F%98%80. The output counter reports percent-encoded bytes, so that emoji contributes four rather than one. Input and output length counters use UTF-16 code units, matching JavaScript string length; an emoji can occupy two units. These counts describe different properties and should not be read as a count of visible characters.

When Should Spaces Become Plus Signs?

Form value mode follows the escaping rules for an individual application/x-www-form-urlencoded name or value. Spaces become +, a literal plus becomes %2B, and a tilde becomes %7E. For example, C++ guide becomes C%2B%2B+guide. Decoding in this mode reverses that distinction. Component mode instead writes spaces as %20 and leaves a literal plus unchanged when decoding.

Form value mode processes the whole input as one value unless batch mode is enabled. It does not separate a query string on ampersands or equals signs. To prepare several fields, encode each name and value separately, then assemble the separators. For an already assembled URL, use Full URL only when its existing separators should retain their structural meaning.

How Can You Convert a List Without Losing Its Lines?

Enable One item per line before pasting a batch of values. Each input line is converted independently using the same direction and format. Original LF, CRLF, and CR line endings are retained, as are empty lines and a final trailing separator. When the option is off, a newline belongs to the input value and becomes %0A during encoding. A decoded %0A can itself introduce a newline inside an item, so a decoded batch is plain text rather than a guaranteed one-record-per-line export.

A malformed item stops the batch result and identifies the failing input line. No successful prefix is presented as a complete result. Fix that line in the input and the entire result updates. There is no fixed character cap, although browser memory and the cost of converting large strings still apply. Splitting very large lists into smaller batches keeps editing more responsive on phones and computers with less available memory.

Why Does Decoding Fail or Leave Percent Sequences Behind?

Incomplete escapes such as %2, non-hex escapes such as %GG, and invalid UTF-8 such as %C3%28 produce an error. The tool avoids guessing a partial interpretation. Encoding also rejects unpaired Unicode surrogates instead of silently replacing them. Plain spaces and tabs are retained as data, including inputs consisting only of whitespace.

Valid remaining escapes have other explanations. A double-encoded space, %2520, becomes %20 after one pass. Use Use output as input to inspect another decoding layer. Full URL decoding deliberately keeps reserved escapes, including %2F and %26, to avoid changing URL structure. Switching direction or format retains your input, so you can compare interpretations without pasting it again.

How Do You Inspect and Edit Query Parameters in a Full URL?

Paste https://example.com/search?q=tea+cake&tag=red&tag=blue#menu into the input. URL parts shows protocol https:, host example.com, path /search, and hash #menu. The query rows show q as tea cake and two separate tag entries. This panel uses the browser's WHATWG URL and URLSearchParams APIs: query values are decoded for editing, including interpreting + as a space, regardless of the conversion format selected above.

Edit a key or value, click Add parameter, or remove a row with its × button. Each edit rebuilds the input URL, keeping query order and duplicate keys. Rebuilt queries use + for spaces in Form value mode and %20 in the other formats. The panel's serializer is separate from the main encoder; it does not apply each profile's punctuation rules. URL serialization can normalize the original spelling, so review the rebuilt address before using it where exact bytes matter. A relative path alone does not populate the panel because parsing has no base URL.

What Are the Privacy and Large-Input Limits?

Conversion uses local JavaScript string operations; it does not upload the input or request the address you paste. There is no fixed input character limit. Above 51,200 UTF-8 bytes, conversion waits 150 milliseconds after the latest input change; at or below that threshold it uses the current input directly. This delay reduces repeated conversion while typing, but conversion still runs on the page and large strings consume browser memory. If Paste cannot access the clipboard, paste directly into the input field.

How to Use URL Encoder / Decoder

  1. Choose Encode or Decode

    Select Encode for plain text or Decode for percent-encoded text. Switching direction keeps the input, so reuse the output first when you want to reverse a conversion.

  2. Select Encoding format

    Choose Component (encodeURIComponent), Component (strict RFC 3986), Full URL (encodeURI / decodeURI), or Form value (spaces as +), according to where the text belongs.

  3. Fill Text to encode or Text to decode

    Type in the input or click Paste. Enable One item per line for independent values. Sample loads an example; Clear empties the input. Large inputs update after a short typing pause.

  4. Review Encoded output or Decoded output

    Check errors before copying. Use output as input processes another layer with the current direction and format. For a full URL, inspect URL parts and use Add parameter or edit existing parameter fields to rebuild the input URL.

Frequently Asked Questions