Advertisement

URL Encoder / Decoder

Encode text for a web address, or decode it back. The tool tells a full address from a single value, shows what each character became and why, and never fails on bad input. It runs in your browser: your text is not sent anywhere.

Encode or decode

Encode turns characters that cannot travel in a web address into % codes. Decode turns % codes back into readable text.
Paste a web address, one value, or any text. The result updates as you type.

The file is read in your browser, up to 2 MB. It is not uploaded.

Each line is handled on its own and gets its own status. Use it for a list of addresses.
A full web address keeps its structure: only the characters that are not allowed are encoded, part by part. One value is text that goes inside an address, such as a search term or another address, so every character with a meaning is encoded. Form data is how a web form sends text: spaces become +.For developers: "One value" matches encodeURIComponent in JavaScript; with the strict option it matches rawurlencode in PHP and quote(text, safe="") in Python. "Form data" matches an HTML form and URLSearchParams. "A full web address" is close to encodeURI, with each part encoded by its own rules. A web address is decoded so that it still works: codes that stand for a separator, such as %26 or %2F, stay encoded, and every value is shown fully decoded under Parts. Plain text decodes everything.For developers: "Plain text" matches decodeURIComponent, except that bad input is kept as typed instead of raising an error.

%20 works everywhere. A + means a space only in form data and after the question mark of an address. Automatic uses + for form data and %20 for everything else.

These five characters are allowed in an address, but some systems expect them encoded.
A domain with letters such as ü or 日本 also has a plain-letter form that starts with xn--. Both open the same site.

In form data, and after the question mark of an address, a + stands for a space. Everywhere else a + is a plus. Automatic keeps + in plain text and reads it as a space in the values under Parts.

For text that was encoded more than once, such as %2520.

Almost everything on the web is UTF-8. Choose another only when the result shows the wrong letters.

Rebuilt from your changes under Parts: encoded and ready to use.
    What URL encoding is. A web address may contain only a limited set of characters. Everything else, including spaces and letters outside plain English, is written as a % followed by two hex digits for each byte: a space is %20 and é is %C3%A9. Encoding does not hide or protect anything, because anyone can decode it.
    Advertisement

    About URL Encoder / Decoder

    The ToolsPivot URL encoder and decoder converts text to and from percent-encoding, and it can tell a full web address apart from a single value. Paste https://example.com/menu/café du jour and it encodes only the unsafe characters in each part of the address, so the link still opens. Decoding works the same way in reverse: an address comes back readable without its data turning into separators. Everything runs in your browser tab, and nothing you paste is sent to a server.

    How to Encode or Decode a URL with ToolsPivot

    1. Pick a direction. Choose Encode or Decode. If the text you paste already looks encoded, or has nothing encoded in it at all, one line appears offering to switch direction.Encode or Decode choice and switch hint
    2. Paste or type your text. The result updates as you type. You can also load a UTF-8 text file up to 2 MB, or turn on One item per line to process a list where each line gets its own status.List pasted with one item per line
    3. Confirm what the text is. A scheme such as https://, mailto: or tel:, or a domain followed by a path, marks the text as a full address. Anything else is treated as one value. You can change this choice, and form data is available as a third option.Full web address detected from the text
    4. Read the status line. A one-line status sums up the result, and the Checks view lists anything that needs a look.Status line and Checks list with warnings
    5. Take the output. Use Copy, download a TXT file, or in per-line mode download a CSV with input, result and status columns. A finished link can go straight into the QR code generator for print or signage.Copy, Download and CSV buttons for results

    The engine is the tool's own JavaScript with no third-party libraries, and it works without an API key or any external service. No text is uploaded, stored or logged. ToolsPivot also keeps no history and creates no share link for this tool, so closing the tab clears your work. If a colleague needs the result, copy it or send the TXT file.

    Choosing Between the Six Encoding and Decoding Modes

    Most encoding bugs come from using the right idea with the wrong character set. Each mode below follows a fixed rule, and the last column names the code function that produces the same output, so the result matches what your own stack will do.

    ModeLeft as it isSpaceMatches
    Encode, one valueA to Z, a to z, 0 to 9, - . _ ~ ! * ' ( )%20JavaScript encodeURIComponent
    Encode, one value, strictA to Z, a to z, 0 to 9, - . _ ~%20PHP rawurlencode, Python quote(safe="")
    Encode, full addressWhat RFC 3986 allows in each part, plus existing codes%20, or + in the queryClose to encodeURI, applied per part
    Encode, form dataA to Z, a to z, 0 to 9, * - . _+HTML forms, URLSearchParams
    Decode, addressCodes for / ? # % \ in the path and for & = + # % in the query, control characters, a trailing spaceNot applicableNo direct equivalent
    Decode, plain textOnly invisible control characters+ kept, or read as a space on requestdecodeURIComponent, without the error

    The difference between the two single-value modes is easy to miss. Encode (sale) ends Friday! with the standard mode and you get (sale)%20ends%20Friday!, which is what a browser script sends. The strict mode returns %28sale%29%20ends%20Friday%21, the same bytes a PHP or Python back end produces. Note that Python's quote() leaves the slash alone unless you pass an empty safe value, which is why the strict mode names quote(safe="") specifically.

    Pick form data only when the text is headed for an HTML form body or a query built by URLSearchParams. There, fish & chips becomes fish+%26+chips. The full address mode is the one to use for a complete link, and it lets you choose + or %20 for spaces in the query. If you are cleaning up dynamic links for a whole site rather than one address, the URL rewriting tool handles that job.

    Full Address or Single Value: The Same Text, Two Results

    Paste a complete link into an encoder that treats everything as one value and the link stops working. Here is the same input under both rules:

    • Input: https://example.com/menu/café du jour?lang=fr
    • Encoded as one value: https%3A%2F%2Fexample.com%2Fmenu%2Fcaf%C3%A9%20du%20jour%3Flang%3Dfr
    • Encoded as a full address: https://example.com/menu/caf%C3%A9%20du%20jour?lang=fr

    In full address mode the tool splits the text into scheme, login, domain, port, path, query and fragment, and each part follows its own RFC 3986 rules. The colon and slashes survive, the space becomes %20, and the é becomes its two UTF-8 bytes, %C3%A9. The one-value result is only correct when the whole link is itself a value, for example a return address passed inside another link's query.

    Codes already present are kept, not encoded twice. Paste https://example.com/50%25-off and the %25 stays as it is instead of turning into %2525. A raw & inside a query is a different matter: in any full address it starts a new parameter, so if a value contains one, encode that value on its own first. fish & chips becomes fish%20%26%20chips and can then sit safely after q=. Long results like these are good candidates for the URL shortener before you share them.

    Decoding an address leaves separator codes encoded. Take ?q=x%26y: a plain decoder turns it into q=x&y, and the server then reads two parameters where there was one. Here %26 stays %26 in the decoded address, while the Parts view shows the value as x&y.

    Reading the Checks, Parts, What Changed and Compare Views

    Below the result sit four views. The status line tells you whether anything was flagged, and the views tell you why.

    Checks lists four kinds of problems. A stray %, such as the one in 100%zz or a lone % at the end of a value, is reported with its position and left in place. Bytes that are not valid UTF-8 come with readings in other character sets: caf%E9 is not UTF-8, but read as Windows-1252 it is café. The tool offers UTF-8 plus 12 older sets: Windows-1252, 1250, 1251, 1254, 1256 and 1258, KOI8-R, Shift_JIS, EUC-JP, GBK, Big5 and EUC-KR. Text encoded more than once is flagged with the number of rounds, and repeated decoding runs up to 10 rounds with each round listed. Finally, plus signs that may mean spaces are marked so you can decide.

    Parts breaks an address into scheme, login, domain, port, path, each parameter name with its decoded value, and fragment. Addresses nested inside a value, such as a redirect target inside a login link, are opened up to three levels deep. Edit any part in the table and the tool rebuilds a correctly encoded address around your change.

    What changed lists every character that was altered and the reason, for instance a space in the path turned into %20. To check two versions of a long query string side by side outside the tool, paste them into Text Compare.

    Compare shows the same input under every rule set at once, each labeled with the matching function in JavaScript, PHP and Python. This is the quickest way to see why a front end and a back end disagree about the same string.

    Fixing URIError, %2520 and Other Broken Links

    These are the problems developers and site owners report most often in forums and bug trackers, with what causes each one and how this tool handles it.

    "URIError: URI malformed" or "malformed URI sequence". Chrome and Firefox throw these when decodeURIComponent meets a % that is not followed by two hex digits, as in 100%, or bytes that are not UTF-8, as in a%AFc. The plain text decode mode never fails on this input. It keeps the stray % and shows its position, so you can fix the source by writing a real percent sign as %25.

    %2520 where %20 should be. This is double encoding: the % of %20 was encoded again as %25. Admins see it in SharePoint document paths and Drupal redirects, and the result is usually a 404. The Checks view counts the rounds, for example two rounds in hello%2520world. Decode once, then find the layer that encodes a second time. A redirect that adds the extra round shows up in the Location header, which you can inspect with Get HTTP Headers.

    A link that starts with https%3A%2F%2F. Some plugin or encoder treated the whole address as one value. Run it through Decode with the address type, or rebuild it from the original in full address mode. To confirm the fixed link resolves where it should, run it through the WWW redirect checker.

    A plus sign turns into a space. Under form rules, + in a query means a space, so a search for c++ can reach a server as c followed by two spaces. Encode a literal plus as %2B. Because a + in an address query cannot be known to be a plus or a space, this tool leaves it alone and flags it rather than guessing.

    A � symbol after decoding. The bytes came from an older system that did not use UTF-8. Open Checks, compare the candidate readings and pick the one that makes sense. If many pages carry such links, the broken link checker will find the ones that already fail.

    Batch Lists, Text Files and International Domains

    For a list of addresses or values, turn on One item per line. The tool accepts up to 50,000 lines in this mode and gives each line its own status, so one bad entry does not hide the rest. The CSV download has three columns, input, result and status, which makes it easy to filter for flagged rows in a spreadsheet. Remove repeats first with Remove Duplicate Lines, check that a long export stays under the limit with the line counter, and turn the CSV into an API-ready array with CSV to JSON. Text files can be loaded directly if they are UTF-8 and no larger than 2 MB.

    International domains are converted to and from their xn-- form using Punycode, defined in RFC 3492. münchen.de becomes xn--mnchen-3ya.de, and pasting the xn-- form back shows the readable name. The interface itself is available in 18 languages.

    Limits, and Where Other URL Encoders Do Better

    Encoded output is always UTF-8. If a legacy system expects ISO-8859-1 or Windows-1252 bytes in its links, urlencoder.org is the better choice: it can convert to another character set before encoding and accepts files up to 100 MB, against the 2 MB file limit here. Character-set readings on decode are candidates to choose from, not automatic detection, so the final call is yours. Domain conversion applies Punycode with lower-casing and normalization, not the full international domain mapping tables, so rare characters that those tables remap may convert differently from your browser's address bar.

    The engine follows RFC 3986 for which characters are allowed in which part, the WHATWG URL standard for form encoding and for how a broken % is treated, and RFC 3492 for Punycode. Version 2.0 passes 155 automated checks, including thousands of random inputs compared against the browser platform's own encoder, decoder and address parser. Here is how ToolsPivot compares with the two encoders that rank at the top for this search:

    TestToolsPivoturlencoder.org and urldecoder.orgurlencoder.io
    Full address pasted into the encoderStructure kept, only unsafe characters encodedWhole address escaped (https%3A%2F%2F)Whole address escaped
    Choice of + or %20 for spacesYes, both directionsNoNo
    Broken input (100%zz and a lone %)Kept, position shownSilently changed, no messageNot recorded
    Bytes that are not UTF-8 (caf%E9)Reported, readings offeredShows caf�, no hintNot recorded
    Decoding q=x%26y in an addressStays %26, value shown as x&y in PartsBecomes q=x&y, value boundary lostNot recorded
    Where the text goesStays in the browserPosted to the server unless live mode is onStays in the browser

    Tested on October 10, 2026, by typing the same inputs into each live tool.

    URL Encoding Questions

    Report a Bug