LinkedIn's official data export (Member Data Portability snapshot) and API access both suffer from a serious limitation: they strip line breaks and line-ending whitespace from free-text fields (e.g., "About", "Experience", "Summary").
As a result:
- Carefully formatted profile sections lose their structure when exported.
- Paragraphs and manual line breaks are flattened into a single block of text.
- Tools that consume the exported data cannot reconstruct the original formatting reliably.
A practical workaround is to encode line breaks using Markdown-style "two spaces at the end of a line". These trailing spaces survive LinkedIn's processing and can be used later to restore line breaks in downstream tools (for example, parsers built around linkedin-mdp-api).
This script automates that workaround: it ensures that, right before you save an edit on LinkedIn, every line/paragraph in relevant fields ends with exactly two spaces.
A Userscript is a small piece of JavaScript that runs in your browser and modifies the behavior or appearance of specific websites locally. It is managed through a browser extension called a userscript manager.
To use this script, you need to install a userscript manager extension, such as: Tampermonkey, Violentmonkey, Greasemonkey.
- Install one of the extensions above.
- Open the raw script file:
linkedin_eol_formatter.user.js - The extension will automatically detect it and show an install dialog.
- Click Install.
The script will now activate automatically when you open any LinkedIn profile edit form.
- Watches the page for LinkedIn edit dialogs to appear.
- When a dialog is opened, it finds the Save button and hooks the button's click event.
- When you click Save, the script instantly scans all edit fields in the dialog, strips any trailing whitespace and appends exactly two spaces to the end of every paragraph/line.
This script is intentionally simple, transparent, and local-only. You are encouraged to review its source code to verify its safety.
By inspecting the code, you will see that:
- It does not send any requests to external servers (no
fetch()orXMLHttpRequest). - It does not read from or write to
localStorage, cookies, or any persistent storage. - It does not contain any tracking or analytics.
- It only observes the DOM and dispatches local browser events to format your text.
All processing happens entirely within your browser on your machine.