# URL Stripper

Free online URL stripper: remove http/https/ftp URLs and www. links from text, optionally strip emails, and tidy leftover spacing in your browser.

## Run it

- **CLI:** `gizza tool url-stripper "Read the docs at https://example.com/guide and email us at hi@example.com — more at www.example.com."`
- **Web:** https://gizza.ai/tools/url-stripper/
- **Agents:** machine-readable descriptor (parameters JSON Schema) at https://gizza.ai/tools/url-stripper/tool.json

## Inputs

- `input` — Text _(field)_
- `remove_emails` — Also remove email addresses _(field)_
- `remove_www` — Also remove www. links _(field)_
- `replacement` — Replace each link with (blank = delete) _(field)_
- `collapse_whitespace` — Tidy the spacing left behind _(field)_

## Output

- Cleaned text (text)

## Query parameters

Open the tool pre-filled and auto-run via URL:

- `input` — Text
- `remove_emails` — Also remove email addresses
- `remove_www` — Also remove www. links
- `replacement` — Replace each link with (blank = delete)
- `collapse_whitespace` — Tidy the spacing left behind

Example: `https://gizza.ai/tools/url-stripper/?input=Read%20the%20docs%20at%20https%3A%2F%2Fexample.com%2Fguide%20and%20email%20us%20at%20hi%40example.com%20%E2%80%94%20more%20at%20www.example.com.&remove_emails=true&remove_www=true&replacement=%5Blink%5D&collapse_whitespace=true`

---

## About this tool

**URL Stripper** removes web links from a block of text so what's left reads as clean
prose. Paste an email, a chat log, scraped copy, or an AI-generated draft, and it deletes
every `http://`, `https://`, and `ftp://` URL — and, by default, scheme-less links that
start with `www.` — leaving the surrounding sentences intact.

You control exactly what happens to each match:

- **Replace with nothing (default):** the link is deleted outright.
- **Replace with a placeholder:** type something like `[link]` into *Replace each link
  with* and every URL becomes that token instead of vanishing.
- **Also remove emails:** tick *Also remove email addresses* to strip bare addresses like
  `name@example.com` in the same pass.
- **Also remove www. links:** on by default; untick it to delete only true scheme URLs and
  leave `www.example.com` in place.

By default the tool then **tidies the spacing** left behind — it collapses the double
spaces a deleted URL leaves, drops a space sitting before a comma or period, removes
brackets that are now empty (`Source (https://a.com/x) here` → `Source here`), and trims
each line. Newlines and blank lines are kept, so paragraph structure survives. It even
keeps the sentence's own punctuation when a URL is glued to it: `See https://x.com/y.`
becomes `See.`, not `See`.

Everything runs locally in your browser via WebAssembly — nothing is uploaded, and no link
is ever fetched or followed. The same engine powers the command-line and chat versions.

### Worked example

Input:

```
Read the docs at https://example.com/guide and email us at hi@example.com — more at www.example.com.
```

With **Also remove email addresses** on and the replacement left blank:

```
Read the docs at and email us at — more at.
```

Leave emails off (the default) and the address stays; switch the replacement to `[link]`
and each URL becomes `[link]` instead of disappearing.

## FAQ

<!-- FAQ MUST be <details>/<summary> accordions with a blank line inside each. -->

<details>
<summary>What kinds of links does it remove?</summary>

Scheme URLs — `http://`, `https://`, and `ftp://` — always. By default it also removes
scheme-less links that begin with `www.` (like `www.example.com`); untick **Also remove
www. links** to keep those. Bare email addresses are removed only when you tick **Also
remove email addresses**. A URL stops at the first whitespace, bracket, or quote, so a link
inside `(…)` or `"…"` is removed without eating the punctuation around it.

</details>

<details>
<summary>Can I replace links with a placeholder instead of deleting them?</summary>

Yes. Type anything into **Replace each link with** — for example `[link]`, `[url]`, or
`***` — and every removed URL/email becomes that token. Leave the field blank (the default)
to delete each link entirely. The placeholder is inserted verbatim, so you can even use an
empty-looking marker or a full label.

</details>

<details>
<summary>Will removing a link leave weird gaps or broken punctuation?</summary>

Not with **Tidy the spacing left behind** on (the default). It collapses the double space a
deleted URL leaves, drops a stray space before a comma/period, removes brackets left empty
once their link is gone, and trims each line — while keeping newlines and blank lines so
paragraphs stay intact. Trailing punctuation stuck to a URL is preserved too, so
`See https://x.com/y.` becomes `See.`. Turn the option off if you want the raw gaps left
exactly where the links were.

</details>

<details>
<summary>Is my text uploaded anywhere?</summary>

No. The stripping runs entirely inside your browser via WebAssembly — the text never leaves
your device, and no link is fetched or followed. The same engine also powers the
command-line and chat versions.

</details>

## Limits & edge cases

- **Detection is text-pattern based:** links are matched by shape (`scheme://…`, `www.…`,
  `name@host.tld`), not by validating that a host really resolves. A URL missing its scheme
  and not starting with `www.` (e.g. a bare `example.com/path`) is left alone, and a word
  that merely looks like an address could match.
- **A URL ends at the first delimiter:** whitespace, quotes, or brackets terminate a match.
  A link containing a literal space (unusual, usually percent-encoded) is only removed up to
  that space.
- **Counts are not de-duplicated:** the same URL appearing twice counts as two removals.
- **No rich-text/markdown awareness:** it strips the raw URL text. In markdown like
  `[docs](https://x.com)` the URL inside the parentheses is removed, but the `[docs]` label
  and brackets remain — it does not rewrite link syntax.
- **Tidy pass is conservative:** it collapses horizontal spaces and trims lines but never
  merges separate lines or removes blank lines, so intentional formatting is preserved.

## Related tools

- [Emoji remover](https://gizza.ai/tools/emoji-remover/): Remove emoji, flags, skin tones and pictographic symbols from text, in your browser. Delete them, leave a space, or use a placeholder. Nothing is uploaded.
- [Remove control characters](https://gizza.ai/tools/remove-control-chars/): Strip null bytes and non-printable control characters from text, in your browser. Keep tabs and newlines or remove them too. Nothing is uploaded.
- [Parse a Postal Address](https://gizza.ai/tools/address-parse/): Parse a freeform postal address into street, unit, city, region, postcode, and country fields. Local, rule-based, and browser-only.
- [Basic Auth Header Generator](https://gizza.ai/tools/basic-auth-header-generator/): Generate an HTTP Basic Authorization header from a username and password — base64(user:pass) per RFC 7617. Runs in your browser, nothing is sent, free.
- [Calendar Free/Busy Overlap](https://gizza.ai/tools/calendar-freebusy-overlap/): Paste two .ics calendars and list the time slots where both are free — working hours, minimum meeting length, timezones and DST handled. Free and in-browser.
