Percent-encode text for safe use in links and query strings, or decode %20-style text back to readable form instantly — free, private, and runs entirely in your browser.

URL Encode/Decode

Paste text to percent-encode it for a URL — or paste encoded text like %20 and %26 to decode it back to plain, readable characters.

Free to use Encode & decode UTF-8 safe Save PDF · PNG · Share

Enter your values

Fill in the fields below — the result appears with every step shown.

Shown on the printed, PDF and PNG copies of your result. Leave blank to stay anonymous.

Enter a valid value for text or url.

The text to encode, or the percent-encoded text to decode.

Enter a valid value for mode.

Encode makes text safe for a URL; decode reverses percent-encoding.

Local browser calculation

Review your inputs and the tool’s supported scope before using the result.

Calculator loading… If this message stays, this view is not running the calculator's script — open this file in a full browser tab, then press Calculate.

Your result will appear here

Enter your values above, then press Calculate — or press Enter in any field.
TinyExe URL Encode/Decode tinyexe.comFree online calculators

TinyExe · URL Encode/Decode Result

Calculated locally in your browser

Calculated on
—

–
—

Name

—

Text or URL

—

Mode

—

Result

—

How this was calculated

    What to do next

      TinyExe · tinyexe.com — Runs 100% in your browser — your numbers never leave this tab; nothing is uploaded or stored.

      TinyExe PDF & PNG exports carry the TinyExe logo and tinyexe.com header & footer.

      Runs 100% in your browser — your numbers never leave this tab; nothing is uploaded or stored.

      Embed this tool

      Add this URL Encode/Decode to your own page — copy the code below and paste it where you want the tool to appear.

      The embed loads the live calculator in a frame, so it stays up to date automatically. Choose a width, check the code, then copy it. When you publish on WordPress, keep the src pointing at your live tool URL.

      Works in WordPress (Custom HTML block), HTML pages, and most site builders.

      The short answer

      URL encoding replaces characters that are unsafe or reserved in a web address with percent codes: a space becomes %20, an ampersand becomes %26, and non-ASCII characters become their UTF-8 byte codes. Decoding reverses every %XX sequence, so hello%20world becomes hello world again, ready to read or reuse safely anywhere online.

      • Space encodes as %20, & as %26, ? as %3F
      • Encoding follows RFC 3986 / encodeURIComponent
      • Non-ASCII text is encoded as UTF-8 bytes
      • Decoding invalid % sequences gives a clear error

      Common percent-encodings

      Reference values for this calculator.

      CharacterEncodedWhy
      space%20Spaces are not allowed raw in URLs
      &%26Would split query parameters
      ?%3FWould start a query string
      / in data%2FWould look like a path separator
      é (UTF-8)%C3%A9Non-ASCII is sent as UTF-8 bytes

      The formula

      The exact formula this calculator uses — every variable in it is explained in the card below.

      The formula

      Encoding: percent-encode every byte outside the unreserved set (A-Z a-z 0-9 - _ . ~ and the encodeURIComponent marks) as %XX UTF-8 ; Decoding reverses each %XX sequence

      Uses the standard encodeURIComponent / decodeURIComponent behaviour (RFC 3986 percent-encoding over UTF-8), so spaces become %20 and non-ASCII characters become their multi-byte %XX sequences. The numeric headline is the result length, with the full converted string as the primary detail.

      Worked examples

      Worked examples with the full working shown — try them in the calculator to check.

      Example 1

      Two words

      Encode 'hello world' (11 characters)

      CalculationSteps
      The space is unsafe in a URL and becomes %20: 'hello%20world'.Result 'hello%20world', 13 characters.

      Result

      Example 2

      Reading a link

      Decode 'a%20b'

      CalculationSteps
      %20 is byte 0x20, a space: 'a b'.Result 'a b', 3 characters.

      Result

      Example 3

      Plus sign as data

      Encode 'a+b'

      CalculationSteps
      A literal + in data must not be mistaken for a space, so it becomes %2B: 'a%2Bb'.Result 'a%2Bb', 5 characters.

      Result

      How to use this calculator

      Step 1

      Paste the text or URL fragment into the box.

      Step 2

      Choose Encode to make it URL-safe, or Decode to read a percent-encoded string.

      Step 3

      Press Calculate and copy the result from the details card.

      Step 4

      Use the character count to sanity-check: encoding never shortens text, decoding usually does.

      Step 5

      If decoding fails, the input was not valid percent-encoding — check for stray % signs.

      In short: Percent-encoding (URL encoding) is the mechanism for representing reserved or non-ASCII characters in a URI using % followed by two hexadecimal digits per byte.

      Frequently asked questions

      What is the number this calculator returns?

      The headline value is the length of the converted string, because the conversion itself is text. The converted text is shown in full as the first detail — copy it from there.

      Why does a space become %20 and not +?

      In a URL path, a space is %20. The + for space convention applies only inside form-encoded query strings (application/x-www-form-urlencoded). This tool uses standard percent-encoding.

      Does it encode the whole URL including :// and /?

      It encodes a component (like a query value), following encodeURIComponent, which also encodes / and :. Encode individual values, then assemble the URL — do not paste a full working URL and encode it wholesale.

      What happens with emoji or accented letters?

      They are encoded as their UTF-8 byte sequences — é becomes %C3%A9 — and decoding reverses it exactly.

      Why did decode throw an error?

      A % must be followed by two hex digits and the bytes must form valid UTF-8. A stray % in ordinary text (like '50% off') is not valid encoded data.

      About this calculator

      A URL encode/decode tool converts text between its readable form and the percent-encoded form that web addresses require. Characters with special meaning in a URL — spaces, ampersands, question marks, non-ASCII letters — are written as % plus two hex digits per byte, so a browser or server can carry them without misreading the address structure.

      A URL reserves certain characters as structure: ? starts the query, & separates parameters, # starts a fragment and / separates path segments. When those same characters appear inside data — a search for 'fish & chips', say — they must be encoded, or the receiver will read structure where you meant text. Encoding replaces each such byte with %XX.

      Text beyond plain ASCII is first converted to UTF-8 bytes and each byte is encoded, which is why é becomes the two codes %C3%A9 and an emoji becomes four codes. Decoding runs the process backwards: %XX sequences become bytes, and the bytes are interpreted as UTF-8 text.

      The headline number here is the converted string's length — a useful integrity check. Encoding can only keep text the same length or grow it, and a decoded string that comes out longer than its input is a sign something was double-encoded.

      Use it when building links with query parameters, debugging a URL a system generated, reading a redirect target full of %20s, preparing search terms for an API call, or checking why a link breaks when a product name contains an ampersand.

      How to calculate it yourself

      Step 1

      Identify the exact text that will sit inside the URL — a query value, not the whole address.

      Step 2

      List the characters in it that are reserved or non-ASCII.

      Step 3

      Replace each unsafe byte with % and its two-digit hex code (its UTF-8 bytes for non-ASCII).

      Step 4

      Assemble the URL with the encoded value in place.

      Step 5

      To decode, reverse each %XX back to its byte and read the bytes as UTF-8.

      Real-life examples

      The broken product link

      A shop owner shares a link with the product name in the query: ?name=fish & chips. The server reads two parameters and the name comes out as just 'fish'.

      Encoding the value first: 'fish & chips' becomes 'fish%20%26%20chips', so the full query is one parameter.

      The shared link now delivers the full product name 'fish & chips' to the page.

      Debugging a redirect

      A marketer is handed a redirect target reading 'spring%20sale%3Fref%3Demail' and needs to know what it actually says before approving it.

      Decoding each code: %20 is a space, %3F is ?, %3D is =. The text reads 'spring sale?ref=email' (24 characters decoded from 27).

      She spots the misplaced '?' that would break the tracking parameter and sends the link back for fixing.

      Ideas & use cases

      • Build safe share links: encode any title or search term before dropping it into a query string you send to customers.
      • Audit analytics data: decode the landing-page URLs in a report to read the actual search terms and campaign values people arrived with.
      • Double-encoding check: decode once; if % codes remain, the text was encoded twice — a common bug in email and redirect chains.

      Limitations & sources

      • Encodes and decodes one URL component at a time using encodeURIComponent rules; it does not parse, validate or fetch full URLs, and form-style '+' handling differs from query-string decoders.

      Sources: RFC 3986 section 2.1 percent-encoding; ECMAScript encodeURIComponent / decodeURIComponent semantics

      URL Encode/Decode · TinyExe calculator suite Free to use · No sign-up · Instant results