AI Text Formatting||9 min read

How to Fix Indentation Issues in AI Generated Lists

How to Fix Indentation Issues in AI Generated Lists - Practical tips from the PasteClean team.

Hero image for How to Fix Indentation Issues in AI Generated Lists

You’ve been there: you ask ChatGPT to outline a project plan, it generates a beautifully structured nested list with clear hierarchy, and you hit copy. Then, you paste it into Outlook or Gmail, and that structure instantly collapses. The sub-bullets flatten against the left margin, the numbering resets to "1" for every line, or worse, the bullets disappear entirely, leaving you with a wall of disjointed text.

This isn't just a visual annoyance; it destroys the logic of your communication. When a sub-task looks like a main task because the indentation vanished, you risk miscommunicating project priorities to your team. The issue lies in the invisible war between modern web rendering and the archaic HTML engines powering your email client. Here is exactly why this happens and how you can fix broken lists without retyping them manually.

The Invisible Code Behind Your AI Chatbot

To understand why ai list indentation breaks, you have to look under the hood of the chatbot interface. When Claude or ChatGPT displays a list, it isn’t serving you a Word document. It is generating Markdown text, which the browser then renders as HTML.

When you highlight that text and copy it, you aren't just capturing the words. You are capturing the "Computed DOM"—the specific HTML structure and inline CSS styles the browser is using to display that text.

Typically, a nested list in HTML looks like this:

<ul>
  <li>Item 1</li>
  <li>Item 2
    <ul>
       <li>Sub-item A</li>
    </ul>
  </li>
</ul>

However, AI interfaces often complicate this. They wrap these lists in <div> containers, apply flexbox layouts for alignment, or use CSS variables for spacing (margins and padding). Modern browsers like Chrome handle this effortlessly. Email clients do not.

Why Outlook Mangles Your Indentation

Outlook is the final boss of formatting frustrations. Unlike web browsers, the desktop version of Outlook uses Microsoft Word’s rendering engine to display HTML emails. While Word is great for print documents, it is notoriously terrible at interpreting modern web standards.

When you paste an AI-generated list into Outlook, the engine encounters CSS properties it doesn't support—specifically complex padding-left or margin-left calculations used by the AI interface to create visual indentation.

Outlook ignores these unsupported styles and defaults to its own internal logic, which usually means:

  1. Stripping the margin entirely (flattening the list).
  2. Converting the list items into standard paragraphs (<p> tags) with bullet characters, destroying the semantic link between the items.

Pro Tip: If you see a list in Outlook that looks like it has huge vertical gaps between bullets, it’s because the paste action brought over margin-bottom styles from the web interface. Outlook interprets these as double-spacing.

Gmail and the "Div Soup" Problem

Gmail is slightly more forgiving than Outlook, but it introduces a different set of headaches when you try to clean ai formatting. Gmail tends to be aggressive about stripping out "unsafe" CSS classes.

If the AI tool defined the indentation using a class (e.g., <ul class="indent-level-2">), Gmail will likely strip that class name out for security and consistency reasons. Without the class definition telling the browser how much to indent, the list snaps back to the left margin.

Furthermore, many AI models wrap their responses in code blocks or specific font containers. When pasted into Gmail, you often end up with a "Div Soup"—nested containers that lock the font size or background color, making it impossible to adjust the list formatting using Gmail's native toolbar.

The "Paste as Plain Text" Trap

The most common advice you’ll see on Reddit is to "Paste as Plain Text" (Ctrl+Shift+V or Cmd+Shift+V). While this technically removes the broken HTML, it is a scorched-earth strategy that usually creates more work than it saves.

Here is why relying on plain text is a bad workflow:

  • You lose all bolding and italics: AI often bolds key terms or deadlines. Plain text wipes this out.
  • You lose hyperlinks: If the AI included links to sources or documents, those are converted to non-clickable text.
  • You lose the list structure entirely: Plain text converts a bullet point into a literal asterisk character (*) or a dash (-). Outlook and Gmail do not automatically convert these back into interactive lists. You have to manually select the lines and click the bullet button again.

You need a list formatting fix that preserves the semantic structure (bolding, links, hierarchy) while stripping the proprietary styling.

Manual Fixes in Outlook (The "Decrease/Increase" Trick)

If you are stuck without tools and need to fix a broken list immediately in Outlook Desktop, do not try to drag the ruler markers at the top of the screen. That is a recipe for misalignment.

Instead, force Outlook to re-calculate the list logic:

  1. Select the entire list. Highlight everything, even the sub-bullets that look flat.
  2. Clear Formatting (Optional but recommended): Click the icon that looks like an 'A' with a pink eraser. Note that this will remove bolding, so skip this if you need to keep emphasis.
  3. Re-apply the List Style: Click the Bullet or Numbering button on the ribbon. This forces Outlook to wrap the text in its own MsoListParagraph tags.
  4. The Indentation Shuffle: At this point, the list is likely flat (all level 1). Place your cursor on the line that should be a sub-bullet.
  5. Use the Tab Key: Hit Tab. If Outlook is behaving, it will indent. If it doesn't, look for the "Increase Indent" button in the Paragraph section of the ribbon.

This method is tedious for long lists, but it forces the engine to recognize the hierarchy again.

The "TextEdit" Intermediary Workflow

If you are on a Mac, you have a secret weapon that works better than pasting directly into email: TextEdit (or Notepad on Windows, though it's less effective).

TextEdit has a "Rich Text" mode that is much simpler than a browser's rendering engine but more complex than plain text.

  1. Copy the list from the AI chatbot.
  2. Paste it into a new TextEdit document.
  3. Copy it from TextEdit.
  4. Paste it into your email client.

TextEdit acts as a filter. It understands the basic HTML structure of the list but discards the complex CSS flexbox containers that confuse Outlook. It essentially simplifies the code down to basic <ul> and <li> tags, which email clients handle much better.

Before and After: The Formatting Difference

To visualize why this matters, let's look at the code difference.

The "Dirty" Copy (Direct from AI): This is a simplified version of what you are actually pasting. Note the inline styles and spans.

<div style="background-color: #f7f7f8; color: #374151;">
  <span style="font-family: Söhne, ui-sans-serif;">
    1. Phase One
  </span>
  <div style="margin-left: 20px;">
    <span style="font-family: Söhne, ui-sans-serif;">
      - Kickoff meeting
    </span>
  </div>
</div>

The Cleaned Copy (What Email Clients Want): This is what a tool like PasteClean or a proper manual fix produces.

<ol>
  <li>Phase One
    <ul>
      <li>Kickoff meeting</li>
    </ul>
  </li>
</ol>

The second example has no font definitions, no background colors, and no pixel-perfect margin requirements. It relies on the email client's default stylesheet to decide how a list should look, ensuring perfect rendering every time.

Dealing with Dark Mode Backgrounds

One of the most persistent issues with clean ai formatting is the "Dark Mode Shadow." If you use ChatGPT or Claude in dark mode, the copied text often brings a background color attribute with it (usually a dark grey like #2d2d2d).

When you paste this into a light-mode email:

  • The text might turn white (making it invisible against a white email background).
  • Or, the text stays black, but it sits inside a black box.

Standard "Clear Formatting" buttons in Gmail often miss background shading on container <div> tags.

The Fix: In Gmail, select the text, go to the text color menu (the underlined 'A'), and select "Background Color: Transparent" or "None." In Outlook, you have to look for the "Shading" paint bucket icon (usually in the Paragraph group) and select "No Color."

The "Paste Special" Option in Office

Microsoft Office apps have a hidden gem called "Paste Special" that offers more nuance than standard pasting.

When you are pasting into OneNote or Word (before moving to Outlook):

  1. Copy your AI text.
  2. Instead of Ctrl+V, press Ctrl+Alt+V (Windows) or Cmd+Ctrl+V (Mac).
  3. Look for "HTML Format" vs "Formatted Text (RTF)".

Testing "Formatted Text (RTF)" can sometimes preserve indentation better than HTML when moving between Microsoft apps, as it translates the web nesting into Word's tab-stop logic immediately.

Expert Insight: Never paste AI text directly into a shared Google Doc or Word Doc that uses a corporate template without cleaning it first. The inline styles from the AI can "infect" your document's styles, causing headers later in the document to revert to the chatbot's font family (often Segoe UI or Roboto) instead of your company's standard font.

Why Specialized Cleaning Tools Win

While manual workarounds function in a pinch, they break your flow. You have to stop thinking about the content of the email and start thinking about the mechanics of the rendering engine.

This is why we built PasteClean. We realized that the issue wasn't the text itself, but the container tags wrapping the text. To truly fix broken lists, you have to parse the HTML, identify the lists, strip the classes, and rebuild the semantic tags.

A dedicated cleaner automates the removal of:

  • Background colors (Dark mode artifacts).
  • Font-family constraints (So your email matches your signature).
  • Fixed-pixel margins (Restoring fluid indentation).

Checklist: The Ultimate Formatting Workflow

If you want to ensure your AI-generated emails look professional every time, follow this hierarchy of operations:

  1. The Gold Standard: Run the text through a dedicated HTML cleaner (like PasteClean) to normalize the list tags.
  2. The Silver Standard: Paste into a rich-text intermediary like TextEdit or MacOS Notes, then copy to email.
  3. The Bronze Standard: Paste into email, select all, "Clear Formatting," then manually re-apply bullet points to the lines that need them.
  4. The "Don't Do This": Pasting directly from the browser and hitting send without reviewing.

Stop Fighting the Rendering Engine

Indentation issues in AI lists aren't user error; they are a compatibility failure between the cutting edge of AI and the legacy infrastructure of email. Outlook wants semantic HTML, and AI chatbots provide styled DOM elements.

By understanding that you are moving code, not just text, you can stop fighting with the ruler bar and start using the right method to strip the styles. Whether you use a dedicated tool or a manual workaround, the goal is the same: clean, semantic HTML that lets your ideas stand out, rather than your formatting struggles.

Clean your AI text instantly

Paste text from ChatGPT, Claude, or any AI tool and get clean, email-ready formatting in one click.

Try PasteClean Free