Submitted by Vievin t3_10gwlin in LifeProTips

I learnt this from my DnD days, when most of my character sheet was copied and pasted from various PDFs into the site we used. The formatting was often horrible, especially when I copied out of sidebars or tables. So what I did was select the relevant text in the PDF, copy it, paste it into the URL bar, ctrl-A and copy from the URL bar, and paste it into the website. Boom, all line breaks gone.

A more practical application for this is when you're applying to jobs, and need to basically copy the contents of your resume onto their web forms.



You must log in or register to comment.

Dreunin t1_j5589iv wrote

I've always done this! People consider me insane but can name no better alternative. Ctrl + shift + v rarely gets rid of the line breaks.

If someone knows a shortcut, I'd love to know


BranWafr t1_j55f0rz wrote

Notepad++ can easily strip out line breaks, so I just paste into that and remove the line breaks with a search and replace.


Dreunin t1_j55f7tj wrote

Sure, you can do that, but it's still not as fast


CapnHanSolo t1_j560szk wrote

What if I just press ctrl+f on the pdf and use the find bar. Would that work


Bunanuhs t1_j57qgrq wrote

You use the replace function and replace "^p" with a single space.


dubbzy104 t1_j562vix wrote

Probably not. Notepad++ and other text editors look for the new line character “\n”, whereas most pdf search tools will look for the literal characters \ and n


DigitalSteven1 t1_j564f9s wrote

Just a minor correction, the almost universal escape character is a backslash. i.e. it's "\n" rather than "/n."

Windows does some funny stuff in cmd and powershell, being caret (^) and backtick (`). Afaik "/" isn't used anywhere, though.


dubbzy104 t1_j565brs wrote

Gah, you’re right! I blame it on me being on mobile so the key locations are different, and me being sleep deprived. Surely it’s not because I’m a bad programmer…


Old_timey_brain t1_j59v0ar wrote

Are these not simple formatting options we want to get rid of?

I paste into a new email set to plain text, then copy back out.


bbqfoot34 t1_j58q9ma wrote

I really tried with notepad but it doesn't seem to strip everything as effectively as a url. I wish there was an add-on because sometimes there's a lot of text


BranWafr t1_j592dqq wrote

Not Notepad, Notepad++, they are very different programs.


deathstark t1_j56e068 wrote

If you paste into excel, you can press CTRL J in the find box and replace with space. Probably not quicker though


Che_Pibe t1_j56oq12 wrote

I mentioned above, if you're on a Mac, paste into a spotlight search (cmd+space) and copy it.


HornetKick t1_j5gcov8 wrote


Just use Notepad. It removes formatting automatically. I keep a version with my resume just to be able to copy/paste quickly.


RoamingArchon t1_j55q6k5 wrote

Just wanted to add, anything you copy into the address bar of your browser will be searched on the Internet using the browser's default search engine, even without submitting it.

Don't put anything sensitive in the URL bar!


One_Reflection_9322 t1_j55x9lx wrote

Exactly. So just paste it into another application, not the browser's url box.

Also, turn off that feature. I have on all my browsers.


imkinagana t1_j556652 wrote

You can simply paste as plain text with ctrl + shift + v


Dreunin t1_j5582g7 wrote

This doesn't always get rid of the line breaks


bayouth t1_j5524dm wrote

cmnd-shift v does this in most applications


YabbaDabbaUngaBunga t1_j562ufz wrote

If you're doing this sort of thing frequently, learn regular expressions. Yes, the barrier to entry can be a little high for an otherwise principally non-technical person, however if text manipulation is a frequent task of yours, you'll thank yourself for having learned.

Many editors (Notepad++, etc.) support regular expressions for search-and-replace. In this case you'd simply search for \s+ (any whitespace characters) and replace them with a single space. This will convert all sequences of newlines, tabs, and spaces, to a single space.

ETA: One caveat with OP's LPT is character length limits on input fields; Chrome appears to be ~2MB, which is really, really high for most practical uses of this trick. But, if you were to copy/paste a whole PDF textbook, you could run into problems. See:


turok2 t1_j55am56 wrote

I tend to use the start menu.

Windows key. ctrl-v. ctrl-a. ctrl-x.


FreeXFall t1_j55q8j4 wrote

The key here is removing line breaks, not formatting. Nice trick.


Garrth_ t1_j557mk2 wrote

or use notepad like human


Vievin OP t1_j55c7vj wrote

Notepad keeps the original line breaks.


wowbackatitReddit t1_j55p8v3 wrote

You can also use Notepad on Windows. Helps because it's meant to hold more than one line


PaxNova t1_j55ykc7 wrote

In Word, you can also highlight the text you want to remove line breaks from and do find/replace.

One the find line, search for ^p. On the replace line, put nothing. ^p means "new paragraph" in Word. You can also replace it with a space if you want.


DaBIGmeow888 t1_j55ilqy wrote

Dang I've been using online page break remover website but this is faster.


Che_Pibe t1_j56ojhl wrote

Line breaks, XML data, all the hidden junk. This is one great LPT!

If you're on a Mac, Command+Space Bar to get a spotlight search, then paste/copy is even faster (in my opinion)


ReformedWiggles t1_j59gljo wrote

It also gets rid of fonts, background color etc. I always do this, always have.


keepthetips t1_j5505nw wrote

Hello and welcome to r/LifeProTips!

Please help us decide if this post is a good fit for the subreddit by up or downvoting this comment.

If you think that this is great advice to improve your life, please upvote. If you think this doesn't help you in any way, please downvote. If you don't care, leave it for the others to decide.


talk_to_arpit_2 t1_j55vup6 wrote

lol.. and I thought, it was only me who was doing it; I basically do it to get rid of all fancy formatting and want plain text, to copy


heidismiles t1_j55wyzd wrote

If you use a developer app like Sublime Text, you can paste the whole paragraph and then hit the shortcut to join all the lines.


freihoch159 t1_j55yabs wrote

Also cleans layout coming from word or other things, my alternative for using the editor if i have some weird formatted text


breakbeat123 t1_j567fxa wrote

On word paste the text from your PDF.

Ctrl + H to replace.

Then find '^p' and replace with a space ' '.

This will turn everything into one paragraph, so if copying multiple paragraphs you'll have to check where to put the line break back in.


Skalion t1_j5686jk wrote

Posting it on editor will get rid of all the styling


SaskiavdM t1_j56xyoq wrote

Sublime Text

Select all and: Ctrl Shift J (join lines). Just know there is such a thing as multi-select and multi edit .. it saved me so much time over the years.


tinywoodenpig t1_j57trul wrote

thank you so much. i always copy paste homework instructions into a word document and it takes so long to fix the line breaks!! also happy cake day


Kludgel t1_j5805xj wrote

Pure gold. Thank you!


BlockMurky875 t1_j580x32 wrote

You’ve just saved me so much time


travleslowgofar t1_j58khid wrote

Subject line of an email is my go to for this.


caydayday t1_j58mkxp wrote

You can ask GPT to get rid of those too.


hassan789_ t1_j58vhaq wrote

Really good tip... Very poor explanation and description. Either way, thanks


TheMcGirlGal t1_j596buw wrote

I just rewrote everything when I wanted to do that with D&D stuff...

Fuck me.


Lucade2210 t1_j55squ0 wrote

Omg this sub is a joke.