DT
DevToolKit
Clearly labeled tools
Tools
Workspaces
Resources
Browse tools
DT
DevToolKit
Practical PDF, image, developer, and everyday tools

Clearly labeled processing for everyday tasks.

Core processing runs in the browser for most tools. Server-backed and external-provider workflows are labeled separately. Basic tools are available without signup; individual limits vary by tool.

46 unique tools4 workspacesNo signup for basic tools
Browse toolsTrust Center
Tools
All toolsPDF workspaceImage studioDeveloper workbenchGeneral tools
Product
BlogSupportContact
Company
AboutTrust CenterPrivacy PolicyTerms of Use

© 2026 DevToolKit. Practical PDF, image, developer, and everyday tools with clearly labeled processing.

In-browserServer-backedExternal preview
amanhirut32@gmail.com
HomeToolsDeveloperURL Encoder / Decoder

URL Encoder / Decoder

  • In-browser
  • No signup
  • Query-safe

Encode and decode URLs, query parameters, and text directly in your browser.

Core processing runs in your browser and does not upload this file for the task.

Preparing the editor...

The guide and instructions on this page are available while the tool loads.

Continue your workflow

  • Base64 Encoder/DecoderEncode or decode Base64 text with btoa/atob. This page uses encodeURI/encodeURIComponent, not Base64.
  • Text Diff CheckerCompare original text with encoded or decoded output line by line. This encoder does not diff.

What URL encoding changes

URL Encoder / Decoder percent-encodes or percent-decodes the textarea with the browser’s URI functions. It starts with empty input and output, Encode mode, Encode component on, and Decode plus as space on. There is no file picker. The slash-free labels Encode URL and Decode URL are buttons; they do not fetch the string as a network URL.

The in-page note is accurate: encoding changes how text is written for transmission, not whether it is private. Percent-encoding is not encryption, sanitization, authentication, or a safety check on a destination.

Whole URLs versus individual URL components

Encode component (default)
encodeURIComponent on encode; decodeURIComponent on decode. Stricter escaping of reserved characters such as &, =, ?, /, :, #, and +.
Encode full URL
encodeURI on encode; decodeURI on decode. Leaves characters that encodeURI treats as URI structure (including : / ? # & = +) unescaped so a complete URL stays readable.

Use component mode for one query value, path segment, or fragment. Use full-URL mode when the paste is already a whole URI and you do not want separators turned into % sequences. The page does not split a URL into scheme, host, and query and encode each part differently; it applies one function to the entire string.

How this tool actually encodes and decodes text

transformInput optionally replaces + with spaces (decode only, if decodePlusAsSpace), then calls one of encodeURIComponent, encodeURI, decodeURIComponent, or decodeURI. Empty or whitespace-only input sets output to empty and shows “Enter text or a URL to continue.” Thrown errors clear output and show a generic decode or encode message; the engine URIError text is not printed.

Until modeTouched is true, handleInputChange sets mode from detectSuggestedMode: Decode if the trim matches /%[0-9A-Fa-f]{2}/, or if the string contains both ? and =; otherwise Encode. Choosing Encode or Decode yourself sets modeTouched, clears output and error, and stops that suggestion. Switching modes does not convert until you click the run button again.

Spaces, plus signs, percent signs, Unicode, and reserved characters

  • Spaces: encodeURI and encodeURIComponent write %20. This page never encodes a space as +.
  • Plus: in Decode with Decode plus as space on, every + in the whole input becomes a space before decoding. Turn the option off when a literal + must remain. encodeURIComponent encodes + as %2B; encodeURI leaves + unescaped.
  • Percent: encoding % produces %25. There is no “already encoded” detector and no double-encoding guard. Decoding a malformed % sequence throws and the UI asks you to check the percent-encoding.
  • Unicode: passed through the same browser functions, which percent-encode non-ASCII as UTF-8 byte escapes. There is no charset selector.
  • Line breaks: no special case; they are characters in the string the URI function receives (typically %0A / %0D when encoded).

Malformed encoded input and common decoding errors

  • decodeURI / decodeURIComponent throw: “Unable to decode this value. Check the percent-encoding and try again.” Output is cleared.
  • encodeURI / encodeURIComponent throw: “Unable to encode this value.” (uncommon for ordinary text).
  • Incomplete escapes such as %2 or invalid hex make the decoder throw. The UI does not repair or partially decode.
  • Encoding an already percent-encoded string encodes the % signs again. That is not treated as an error.

How to use the real controls

  1. Click Encode or Decode in the URL mode group. Clicking a mode clears Encoded output / Decoded output and the error, and sets modeTouched so detectSuggestedMode stops changing the mode.
  2. Paste into Text or URL to encode, or Encoded URL or query string, depending on mode.
  3. Click Encode component (default) or Encode full URL. Those buttons set encodeComponent and may call runTransform in the same click, so that run still sees the previous encodeComponent; click Encode URL or Decode URL after switching if the output does not match the newly selected mode.
  4. In Decode, click Decode plus as space if you need to change the default-on + → space replace. The inspector can already reflect the plus option; Encoded output / Decoded output updates only after Decode URL.
  5. Click Encode URL or Decode URL. The button stays disabled while the textarea is empty. Empty runTransform sets “Enter text or a URL to continue.”
  6. Click Copy output to copy the result textarea via navigator.clipboard.writeText. Failure clears Copied with no red error. The button stays disabled while output is empty.
  7. Click Copy on a Query parameter inspector row to write that param’s decodedValue only when it is non-empty. Empty inspector shows “No query parameters detected.”
  8. Click Load example to fill ENCODE_EXAMPLE (“hello world & special=chars?x=1”) or DECODE_EXAMPLE (an example.com search URL with %20) and run immediately.
  9. Click Clear to restore empty fields, Encode mode, Encode component on, Decode plus as space on, and modeTouched false. Clear is disabled while both boxes are empty.

URL encoding versus form encoding and URL validation

The main output is not application/x-www-form-urlencoded serialization. It does not join keys with &, does not turn spaces into +, and does not set a Content-Type. Decode plus as space is a global character replace, not a form parser.

The Query parameter inspector is separate: parseQueryParams takes text after the first ? (until #), or the whole string if it contains =. It may replace + with spaces, then new URLSearchParams(normalized). forEach lists keys and decodedValue. analyzeUrl also sets hasProtocol from a scheme:// regex and hasPath from includes(“/”). “Detected query params” is that list’s length. This is not new URL(), not RFC-complete parsing, and not a check that a page exists.

What this tool does not do

  • No URL validation, reachability, redirect following, or “safe to visit” check.
  • No automatic double-encoding prevention.
  • No file import, result download, or configured character cap (very large pastes are still limited by the browser).
  • No query builder that re-encodes each parameter separately into a new URL.
  • No Base64, JWT, or regex engine on this page.

A successful encode or decode does not prove the string is a valid URL, is sanitized, is authenticated, or is safe to open.

Privacy and browser-processing boundaries

UrlEncode.jsx calls encodeURI, encodeURIComponent, decodeURI, decodeURIComponent, and URLSearchParams in the browser. It does not call trackToolEvent and does not POST the textarea to an encoding API. That is not a confidentiality guarantee: the rest of the page can still load site assets and advertising; the privacy policy describes first-party analytics for event metadata (not designed to store tool contents); clipboard, extensions, and shared devices remain outside this file.

Do not paste production secrets, session tokens, or customer URLs you would not put on a shared screen. Percent-encoding does not hide them.

A short output-review checklist

  • Confirm Encode versus Decode, and component versus full URL, before copying.
  • If you toggled Encode full URL, Encode component, or Decode plus as space, run Encode URL / Decode URL again so output matches the options you see.
  • If + became spaces, check Decode plus as space; turn it off for literal pluses.
  • If separators vanished into % sequences, you probably used component mode on a whole URI.
  • Treat sidebar query rows as a URLSearchParams sketch, not as proof the destination is valid.
  • Do not encode an already encoded value unless you intend %25.

When another DevToolKit tool is more appropriate

  • Base64 Encoder/Decoder — when you need btoa/atob text, not percent-encoding. The alphabets are not interchangeable.
  • Text Diff Checker — to compare the original paste with encoded or decoded output line by line. This page does not diff.
  • JSON Formatter — when a copied query value is JSON text. This encoder does not parse JSON.
  • Regex Tester — when you need JavaScript RegExp matches against sample text, not URI encoding.

Frequently asked questions

Does conversion run as I type?

No. runTransform runs when you click Encode URL or Decode URL, Load example, or (if the textarea is non-empty) Encode full URL / Encode component. Changing Decode plus as space updates the sidebar inspector immediately but does not refresh Encoded/Decoded output until Decode URL.

What is the difference between Encode component and Encode full URL?

encodeComponent defaults to true. Component mode calls encodeURIComponent / decodeURIComponent. Full-URL mode calls encodeURI / decodeURI, which leave more URI separators unescaped. Those option buttons set state and may call runTransform in the same click, so that run still sees the previous encodeComponent; click Encode URL or Decode URL after switching if the output does not match the newly selected mode.

Does + become a space?

Only in Decode when Decode plus as space is on (the default). transformInput then replaces every + in the whole string before decodeURI or decodeURIComponent. Encoding never turns spaces into +. encodeURIComponent encodes a space as %20; encodeURI also encodes a space as %20.

Does this validate a URL or build form data?

No. The main result is a string transform of the entire textarea. The sidebar uses heuristics (protocol regex, includes “/”, URLSearchParams on a query-like slice). That is not URL constructor validation, not a POST body, and not a guarantee the string is safe to visit.

Related guides

Longer reads that pair well with this tool.

Developer guide

Useful Developer Tools Every Browser Should Have

Fourteen In-browser developer utilities for JSON, encoding, tokens, diffs, hashes, regex, SQL, UUIDs, and timestamps — fast checks without installing anything.

Developer guide

How to Redact and Review Sensitive JSON

Reduce exposure while reviewing sensitive JSON by using synthetic data, redacting credentials and identifiers, and checking browser, screen, and clipboard risks.

Business guide

How to Create QR Codes for Business

Create a static URL, text, email, phone, or Wi-Fi QR code, review the generated payload and preview, then test the export in its intended use.

Related tools

Common next steps after using this tool.

Base64 Encoder/Decoder

Encode and decode Base64 text directly in your browser.

Text Diff Checker

Compare two blocks of text line by line directly in your browser.

Explore more in Developer

Browse related tools or open the full workspace.

Developer workspaceAll tools