This app runs inside the BotSurf browser. Don't have it yet? Get the app or extension now!

URL Encode-Decode on Selection

Developer Tools · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — try it free, no account needed.
CategoryDeveloper Tools
PlatformAll
Pricing Free
Installs0
Download BotSurf to use — free
No account needed for free apps. Once BotSurf is open, find this app in Apps from the + menu.

About this app

WHAT IT DOES

This script adds a floating button that appears when you select text, allowing you to instantly URL-encode or URL-decode the selected content. Choose between component encoding (encodeURIComponent) for query parameters and form data, or full URI encoding (encodeURI) for complete URLs. The result appears in a popup with copy and replace options. Auto-detection recognizes URL-encoded text (containing % signs) and offers decode by default, falling back to encode for plain text. Keyboard shortcuts (Ctrl+Shift+U) provide quick access, and the popup includes dedicated decode and encode buttons for flexibility.

WHERE IT RUNS

The script works on any page with selectable text—URLs, query parameters, API endpoints, log files, configuration data, and any page containing URL-encoded strings. It works on any website, adding a lightweight tool for quick URL operations without leaving your page.

HOW TO USE

After installation, select any text on a page. A floating 🔗 button appears near your selection. Click it to encode or decode—auto-detection decides based on whether the text contains % characters. The result appears in a popup. From the popup, you can copy the result to your clipboard, replace the original selection, or manually trigger decode or encode. Use the keyboard shortcut Ctrl+Shift+U to encode or decode the current selection. Open the panel to customize: show/hide the floating button, choose button position, toggle auto-detect, show/hide the popup, enable replace-on-action, and select encoding mode (component or full URI).

TECHNICAL MECHANISM

The script uses a multi-stage URL encoding/decoding pipeline. First, it captures text selection using the Selection API, detecting when the user selects text and determining the selection's bounding rectangle for button positioning. Second, it auto-detects URL encoding by checking for the presence of `%` followed by two hexadecimal digits (`/%[0-9A-Fa-f]{2}/`). Third, it applies the appropriate operation: decode uses `decodeURIComponent()` with a fallback to `decodeURI()`, while encode uses `encodeURIComponent()` or `encodeURI()` based on the selected mode. Fourth, it displays results in a floating popup with copy, replace, decode, and encode actions. The script uses position tracking to place the button and popup near the selection, and click-outside handlers to dismiss the popup.

THE PANEL

The settings panel is fully draggable and can be positioned anywhere on your screen. It automatically snaps to the nearest edge when released, keeping your workspace organized. The panel can be collapsed to a small bubble showing only a gear icon, and restored with a single click. Its position is remembered across page reloads using GM_setValue. The panel also responds to the Escape key, which instantly hides it until you click the bubble again. All settings are saved immediately when changed and persist across browser sessions.

PLEASE NOTE

This script requires the free BotGentz extension to run. URL encoding/decoding uses the browser's built-in `encodeURIComponent`, `encodeURI`, and `decodeURIComponent` functions. The script does not access, store, or transmit any personal data or browsing history. All processing happens locally in your browser and never leaves your device.

Similar Apps

Log in to BotGentz

Suggest an App

Tell us what you'd find useful — if we build it, we'll email you the moment it's ready.