Skip to content

URL Encode

To URL encode a string online, paste it and copy the percent-encoded output: a space becomes %20, # becomes %23, + becomes %2B, and & becomes %26. This encode URL tool runs encodeURIComponent locally in your browser, so Hindi, Tamil, and emoji become % sequences safe for a query string. Switch to Decode to reverse it.

Updated

Paste text or a percent-encoded string. Encode is the default for building query values; switch to Decode to reverse %XX sequences. The conversion uses your browser's URI component APIs — nothing is sent to Page Utils.

Closing the tab drops both fields. We do not write the paste to localStorage. This is encoding for URLs, not encryption and not the same as Base64 Decode on the developer hub.

URL encode workspace

Encode component

Encode with encodeURIComponent (query/component-safe). Spaces, Hindi, Tamil, and emoji become % sequences. Nothing is uploaded.

Percent-encoded output

Percent-encoded text will appear here.

Percent-encoding for URLs and query strings — not Base64, not encryption, and not a link shortener. Closing the tab drops the paste.

How does the URL Encode work?

  1. 1. Paste text or a percent-encoded string

    Encode is the default. Switch to Decode when you already have %XX sequences.

  2. 2. Read the output

    Encode produces query-safe percent-encoding; Decode restores the original characters when the paste is valid.

  3. 3. Optional full-URI or form mode

    Full URI uses encodeURI's looser alphabet for a whole address. Space as + (form style) writes spaces as + and decodes + back to a space, matching HTML forms and URLSearchParams. Leave both off for typical query values.

  4. 4. Copy and close

    Paste into a URL, form, or docs. Closing the tab clears the workspace.

Questions about URL Encode

Does Decode keep the spaces in my paste?
Yes. Decode keeps interior spaces, so Hello%2C world decodes to Hello, world. It only trims the ends and joins lines when a long encoded string was wrapped across several lines in an email or log, so a%20 on one line and b on the next decodes to a b.
What does this URL encode tool do?
It percent-encodes plain text for use in URLs and query strings, and can decode percent-encoded text back. Encode and Decode run in this browser tab with the same APIs sites use for encodeURIComponent and decodeURIComponent. Nothing is uploaded.
Is URL encode the same as Base64?
No. Base64 uses a different alphabet and is for carrying bytes in text. URL encode replaces reserved characters with %XX sequences so a value is safe inside a URL. For Base64, use the live Base64 Decode page under Developer tools.
Does this shorten my link or check if a URL works?
No. It only transforms the characters you paste. It does not create short links, follow redirects, or fetch the address. Invalid percent sequences show an inline error instead of a guessed fix.
Does this tool upload my text?
No. Encoding and decoding stay in this tab. We do not write the paste to localStorage and we do not send it to Page Utils servers. Closing the tab drops the workspace.
Will Hindi, Tamil, and emoji encode correctly?
Yes for typical web use. The browser encodes UTF-16 string code units the same way JavaScript encodeURIComponent does, so Devanagari, Tamil, and emoji become percent sequences you can paste into a query. If a host expects a different encoding, check that host's docs.
Is there a separate URL decode page?
No. One canonical address with a trailing slash: /text-utilities/url-encode/. Use the Decode toggle on this page. There is no /url-decode/ slug and no /in/ geo duplicate.
Why is this under Text Utilities, not Developer?
Percent-encoding is a small text transform for copy you paste into URLs. Developer hub already has Base64, JSON, UUID, JWT, and cron. Text Utilities keeps URL helpers and Markdown drafting here so the hub stays honest without shipping a banned word-counter stub.
Does URL encode turn a space into %20 or +?
By default Encode writes a space as %20, which is valid in both paths and query values, and Decode leaves + as a literal plus sign. The + form comes from HTML form submits and URLSearchParams (application/x-www-form-urlencoded). Tick Space as + (form style) to encode spaces as + (a real + still becomes %2B) or to decode a form string so each + turns back into a space.
What does an encoded URL look like, and how do I encode # or + in a URL?
An encoded URL swaps each reserved character for a % sign plus two hex digits. With the default Encode setting, a space becomes %20, # becomes %23, + becomes %2B, & becomes %26, = becomes %3D, ? becomes %3F, / becomes %2F, and @ becomes %40. Encode a query value so a # or + inside it is not read as a fragment marker or a space.
Should I use encodeURI or encodeURIComponent?
For query values and path segments, keep Encode on the default encodeURIComponent behaviour so reserved characters become % sequences. Turn on the optional full-URI mode only when you need encodeURI's looser alphabet for a complete address. Decode reverses the matching form; invalid % sequences still show an inline error instead of a guessed fix.
How do I URL-encode a string in JavaScript or from the command line?
In JavaScript, call encodeURIComponent("hello world") for a query value (space → %20); use decodeURIComponent to reverse it. From a Unix shell, python3 -c 'import urllib.parse,sys; print(urllib.parse.quote(sys.argv[1], safe=""))' 'hello world' prints the same percent-encoding. For a one-off paste, this page runs encodeURIComponent in your browser without installing anything.

These tools run in your browser. Page Utils does not store, upload, or write to localStorage the keys, tokens, or text you paste. Results are a convenience aid, not legal, tax, or security advice.