Mobile Number Tracker
Trace Mobile Number Earn Money Online
© TechWelkin.com

How to Remove Leading and Trailing Spaces in MS-Word

Our tips on MS-Word make your life easier and increase your productivity at work.
Samyak Lalit | November 14, 2011 (Last update: February 7, 2015)

Samyak Lalit is an Indian author and disability rights activist. He is the principal author and founder of projects like TechWelkin, WeCapable, Viklangta, Kavita Kosh among many others.

Are you also bothered because of extra spaces at the beginning of lines in MS Word document? Well, I often receive documents full of such line and wonder how to remove extra spaces before these hundreds of lines. But finally I have found an easy method of removing these extra spaces!

More often than not we all get MS-Word files in which a lot of lines either begin with unnecessary spaces or they have lots of trailing spaces –and if it is a really bad case –lines will have both leading and trailing spaces. Not-so-tech-savvy people use leading spaces to align lines (this is why you should subscriber my blog and keep on learning useful MS Word tips)

MS-Word does not provide any straightforward method to remove such unwanted spaces. Therefore, most people remove them manually by repeated pressing backspace or delete keys.

But there is a smarter way to handle this situation! Here it is:

  • Select lines with leading and/or trailing spaces
  • Press Ctrl + E to center align these lines
  • Keeping the lines selected, press Ctrl + R to do right align. This will remove trailing spaces
  • Keeping the lines selected, press Ctrl + L to do left align. This will remove leading spaces

And you are done! Now your MS Word document will be devoid of those extra leading and trialing space. Only neat and clean sentences will remain. After this problem, I usually encounter the arbitrary paragraph or line breaks. Here you can learn how to remove such line and paragraph break too.

If you have a file with .txt and .rtf extensions having extra spaces -you can always open these with MS-Word and apply the same method to do away with spaces.

Please let me know if you have any questions about this method. I will be happy to try and help you. Thank you for using TechWelkin.

© TechWelkin.com

40 responses to “How to Remove Leading and Trailing Spaces in MS-Word”

  1. Mike says:

    Wow that’s genius! Such a simple solution! Thank you

  2. Johnson L.K. Nyingi says:

    how to remove trailing spaces in Excel table in word, i try this method and it worked very fast

  3. COS says:

    This is so fantastic! Thank you very much — I was pulling out my hair, with 50 documents to fix, each with numerous such lines. So grateful for this tip.

  4. Larry says:

    I am using Microsoft 365. Word does not remove the extra trailing spaces using this technique. Any ideas? It does remove the leading spaces.

  5. Dinesh Gaikwad says:

    Simple, yet so elegant way to get rid of those nasty spaces!!

    • Ruby Moseley says:

      There is one page that doesn’t respond to my removing paragraph marks NOR extra spaces. Only page in while doc!! Have tried everything in several tutorials. Can you help me please?

  6. Shaun says:

    Worked, thanks! So much time saved.

  7. cristina says:

    I’m happy! Can’t believe… so many hours lost in vain! You’re a magician. A big big big THANK YOU.

  8. Randall G. Arnold says:

    this is a huge help, thanks!

  9. That was a charm , just a walk in the garden, so soothing. I was able to fix this issue in excel after breaking my head with a formuala =trim(clean(A1)) as = trim() function will only remove the space bar ascII value.

    Words fail to express with so much relief in my office now.

    Regards
    Tirupati Dutta

  10. kfir says:

    WOW! Thank you soooo very much. You saved me literally hours of work with many thousands of such lines. You’re super, I’m really glad I read this!!!

  11. juan says:

    Great tip! thanks

  12. Mr Robert S says:

    Thanks, a nice tip. However it didn’t work for me where I have been given a large table where leading spaces have been used in cells.

    Selecting all the cells the CTRL-E, CTRL-R, CTRL-L doesn’t work… waaah!

    A method that *does* work if the text is in a table is to use “Convert to Text” (Table / Layout tab in Word 2016) and then “Convert Text To Table” … bingo, leading spaces are gone!

  13. Jack says:

    How simple and how effective!

  14. Anita says:

    thank you so much… really glad someone is out there to save our time and energy after research during writing… thank you so much Lalit!

  15. Michele says:

    Oh! you just saved me hours. Thank you!

  16. Lucy says:

    My problem is unwanted space before the text. When I type, text starts in the second or third paragraph.

  17. Ahmed says:

    very good tip, saved much time and overhead

  18. Richard says:

    Brillaint – thank you – saved me hours of deleting!

  19. Neil says:

    Great tip, but does not work in a macro – the spaces stay there

  20. Indirect Design says:

    This is pure genius, saving hours of tedious work. Thank you, thank you, thank you!

  21. Abba Erfani says:

    Thank you for the tip, really helpful and so easy to perform.
    Yours was the best solution I have seen.
    Best wishes

  22. KenE says:

    Find & Replace will remove all leading and trailing spaces from paragraphs without the need to select paragraphs. The following will search every paragraph in the document and if there are leading or trailing spaces or tabs it will delete them.

    To remove leading spaces and tabs the ‘Find what’ and ‘Replace with’ strings are:
    ^13[!^13][^9^32]{1,}*([^33-^126])
    ^p\1
    Note: you must turn on the ‘Use wildcards’ option for this to work.

    To remove trailing spaces and tabs the strings are:
    [^9^32]{1,}^13
    ^p

  23. Jerry says:

    Thank you. That is so easy and makes sense once you think about it. Beats using Replace with wildcards.

    • Lalit Kumar says:

      Hi Jerry, sometimes solutions are simpler than we think! Glad this tip helped you. Looking forward to hear more from you!

  24. shrikant says:

    Man, I have only one word for you. You are AWESOME.

    • Lalit Kumar says:

      Dear Shrikant, I am glad you found this article useful! Yes, this trick of removing leading and trailing spaces in MS Word is so simple that people often feel “wow” about it! :-)

  25. Sajid Rehman says:

    Thanks a Lot.. it's very Helpful … :)

  26. adesmati says:

    Thank you very much, it helped me a lot, I can only pray for you.

  27. Joe Isuzu says:

    OMG this is helpful.

  28. Mehran says:

    Thank your, very helping <3

  29. JPS says:

    Oh god, thank you, you saved my (professional) life!!

  30. anon says:

    This is super clever. Thank you!

  31. Krishna Rao G says:

    Thanks a lot

  32. Shiva says:

    Thanks.. It works perfectly.. :)

  33. jlwodke says:

    That was brilliant, thank-you.

Leave a Reply

Your email address will not be published. Required fields are marked *