Remove Line Breaks API - unwrap copied PDF/email text & keep paragraphs
remove_line_breaksRemove or replace unwanted line breaks in text copied from PDFs or emails: join into one line, keep paragraph breaks, replace with comma or custom separator, rejoin hyphenated split words, trim extra spaces and drop empty lines. Runs on our server, files are deleted right after the call, nothing stored. Free: 5 calls/day per IP. Paid: Radar API key (from €9/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.001/call via x402 at https://radarbg.com/x402/remove-line-breaks.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"mode": "paragraphs",
"text": "This line was bro-\nken by a PDF.\n\nSecond paragraph\nhere.",
"fixHyphens": true
},
"name": "remove_line_breaks"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | space, none, paragraphs, comma or custom | paragraphs |
| text | Yes | Input text with unwanted line breaks | |
| fixHyphens | No | Rejoin words split by a trailing hyphen at line end | |
| trimSpaces | No | Collapse and trim extra spaces | |
| replacement | No | Custom separator when mode=custom (optional) | |
| removeBlankLines | No | Delete empty lines |