Strip Slashes
runs in your browserno sign-upfree
Remove backslash escapes from text like PHP stripslashes(): \' becomes ' and \\ becomes \. Can also strip every level or every backslash.
Slashes stripped
About this tool
Strip Slashes removes backslash escapes from text: \' becomes ', \" becomes " and \\ becomes a single \ — like PHP's stripslashes(). Text that was escaped twice or more (\\\') can be cleaned in one go with "All levels", or you can simply delete every backslash. An option turns \n and \t into real line breaks and tabs.
How to use
- Paste the text with backslashes.
- Choose how much to remove: one level (like stripslashes), all levels, or every backslash.
- Tick "\n \t → line breaks & tabs" if the text has escaped line breaks.
- Copy or download the clean text.
FAQ
What is the difference between the three modes?
One level undoes a single addslashes(): \\ becomes \, so real backslashes survive. All levels repeats that until no escapes are left — for text that was escaped several times. Every backslash just deletes all \ characters, which also removes backslashes that belong in the text (like C:\Users).
Why does \n become n instead of a new line?
That is what PHP stripslashes() does — it only removes the backslash. Tick "\n \t → line breaks & tabs" to turn them into real line breaks and tabs instead. For JSON or JavaScript strings, the JSON Escape and JavaScript Escape tools understand every escape.
Why does my text have extra backslashes in the first place?
Usually because it was escaped twice — for example by an old PHP setting (magic quotes), a form that escaped input before saving it, or JSON stored inside JSON. "All levels" fixes these in one step.
Can I go the other way?
Yes. Use the Add slashes / Strip slashes buttons at the top, or Swap to move the result into the input and switch direction — handy to check that the text comes back unchanged.
Is my text uploaded?
No. Escaping runs entirely in your browser, so your text never leaves your device.