Line Unquoter

Strips a chosen quote character from both sides of every line that has it wrapped around it, the inverse of the Line Quoter tool, turning a quoted array of string literals back into a plain list. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-23

Overview

Introduction

Text pasted from a quoted array of string literals in code often has a quote character clinging to the start and end of every line that needs stripping before further processing.

This tool removes them in one pass, and runs entirely client-side, so nothing you paste is ever uploaded to a server.

What Is Line Unquoter?

A per-line unquoting tool that strips a chosen quote character from both sides of every line that has it wrapped around it.

It's part of this site's String Tools collection and works entirely in your browser.

How Line Unquoter Works

The tool splits the input on newline characters, checks each line for the chosen quote character at both its start and end, strips them when present, and rejoins the lines with newlines.

Lines that aren't wrapped in the matching quote character are left exactly as they were.

When To Use Line Unquoter

Use it after pasting a quoted array of string literals, one per line, to get back a plain list of values.

It's the natural companion to Line Quoter when you need to reverse that transformation.

Often used alongside Line Quoter and String Unquoter.

Features

Advantages

  • Only strips quotes from lines that actually have them, leaving unquoted lines untouched.
  • Works with any custom quote character, not just double quotes.

Limitations

  • Doesn't unescape internal escaped quote characters inside a line.
  • A line shorter than two quote characters is never treated as quoted, to avoid ambiguous partial matches.

Examples

Unquoting a quoted list

Input

"apple"
"banana"
"cherry"

Output

apple
banana
cherry

Each line's surrounding double quotes are stripped, leaving the plain list with newlines preserved.

Best Practices & Notes

Best Practices

  • Use the exact same quote character that was used to quote the lines originally.
  • Check mixed input carefully; only lines with quotes on both sides are affected, so partially-quoted lists stay partially quoted.

Developer Notes

A line is only unquoted when `line.length >= quote.length * 2 && line.startsWith(quote) && line.endsWith(quote)`, which prevents a line made entirely of quote characters from being stripped down past its original content.

Line Unquoter Use Cases

  • Cleaning up a quoted array of values copied from code
  • Reversing output produced by Line Quoter
  • Normalizing mixed quoted and unquoted line lists

Common Mistakes

  • Using a different quote character than the one the lines were originally wrapped in, which leaves them untouched.
  • Expecting trailing commas from a code array to be removed too; only the quote characters are stripped.

Tips

  • Pair with Line Quoter to confirm the operation round-trips correctly for your text and chosen quote character.

References

Frequently Asked Questions