Skip to main content
Participant
Jul 23, 2010 6:35 AM UTC
Answered

transform dashed lines into separate (small)lines

I need to transform a lot of dashed (single) lines into separate lines... Who can tell me how to do this in a few clicks. I don't need an outline of the dashed line. So the black dashes I need, the white in between the dashes I want to loose.

A little complicated to explain... See the example. I need the second lines.

Kind regards, Ellen

    Admirable_imagination01AC
    Participant
    Aug 23, 2018 11:35 AM UTC

    I had the same problem and I found a (what I think easier) method to convert a dashed line into single dashes:

    1. Set thickness of line to 0.0001 pt
    2. Menu Object > Expand (if greyed out, choose Object Expand Appearance first, as the object has appearance attributes applied to it)
    3. Set thickness back to original value

    Voilà!

    - Andy

    Note: With my Illustrator CS6/Win it only works with setting thickness to 0.0001pt (see above). It does NOT work with a thicker line (like 0.001). Why: If it's too thick, the Expand command converts the single dashes to thin RECTANGLES instead of LINES. But if the line is thin enough, Illustrator thinks "This rectangle is so incredibly thin, I can hardly see it, let's make it a line" ;-)

    47 replies

    Legend
    Feb 8, 2026 12:03 AM UTC

    Live Paint can be used as a stroke pathfinder and can be useful to extend dashed strokes.

    This script will expand a dashed stroke in that method.

     

    [sttk3/expandDashedStroke.jsx](https://gist.github.com/sttk3/a087df0d76198e9fe3d5c1c8e76691be)

    Translate
    Participant
    May 4, 2021 2:24 AM UTC

    There is a python script that can do this effortlessly and precise: [breakDashes.jsx]

    [https://github.com/shspage/illustrator-scripts]

    If needed take a few minutes to learn where to paste scripts to the right folder and restart Illustrator. You can now select dashed lines and go file > scripts > BreakDashes

     

    You might also need to signup to GitHub too in order to download the file package with the script you want.

    Translate
    Document Geek
    Community Expert
    Community Expert
    Dec 17, 2021 3:35 PM UTC

    The YouTube video linked above works effortlessly, but I also need to have the gaps filled with a different color. I used the gap color function in InDesign, but when I open that exported file into Illustrator, the dashed line is duplicated copy of the gap color. 

    This first image shows the two paths.

     

    This second image shows the dashed path, see how it was just covered up by the pink path?

    This third image shows how I need the gap to appear. (I did this manually.)

    Translate
    Document Geek
    Community Expert
    Community Expert
    Dec 17, 2021 4:01 PM UTC

    I was able to use the Art Brush tip demonstrated in the YouTube video. I just butted two different lines (different colors) next to each other, without any overlap. Then I made an art brush, applied it, and expanded the appearance.

    Translate
    Participant
    Oct 3, 2018 11:51 AM UTC
    Monika Gause
    Community Expert
    Community Expert
    Oct 3, 2018 12:18 PM UTC

      schrieb

    Expand Dashed Line - YouTube

    Awesome.

    Translate
    Participant
    Sep 26, 2018 7:04 AM UTC

    Kind of amazing that this thread has been open for 8 years and still no *simple* solution to the problem has been found.
    Creating a pattern brush with a short stroke, applying it, and then expanding the appearance seems to be the only workaround at this time.

    Translate
    Admirable_imagination01AC
    Participant
    Aug 23, 2018 11:35 AM UTC

    I had the same problem and I found a (what I think easier) method to convert a dashed line into single dashes:

    1. Set thickness of line to 0.0001 pt
    2. Menu Object > Expand (if greyed out, choose Object Expand Appearance first, as the object has appearance attributes applied to it)
    3. Set thickness back to original value

    Voilà!

    - Andy

    Note: With my Illustrator CS6/Win it only works with setting thickness to 0.0001pt (see above). It does NOT work with a thicker line (like 0.001). Why: If it's too thick, the Expand command converts the single dashes to thin RECTANGLES instead of LINES. But if the line is thin enough, Illustrator thinks "This rectangle is so incredibly thin, I can hardly see it, let's make it a line" ;-)

    Translate
    Kurt Gold
    Community Expert
    Community Expert
    Aug 23, 2018 5:41 PM UTC

    Your approach doesn't work for me, Andy.

    Expanding the dashed strokes always produces separate filled paths, not separate stroked paths. They do look like stroked lines, but they aren't.

    What am I missing?

    Translate
    Admirable_imagination01AC
    Participant
    Aug 24, 2018 12:51 PM UTC

    Sorry to hear it doesn't work for you, maybe you're using another version than my CS6/Win? Maybe you try with even a thinner thickness like 0.000001pt?

    If it doesn't work, try the other solutions using brush pattern.

    Good luck.

    - Andy

    Translate
    Participant
    Jun 8, 2018 12:32 PM UTC

    I needed much the same when creating a cut file for a Cricut machine.

    In that case I needed to make the dashes into a compound path so it would import correctly.

      To do this:

    Making a dotted single cut using a brush pattern (made with a line)

    1. Object -> Expand appearance
    2. Object -> Compound path -> Make

    OR you can use the dash function:

    Making a dotted single cut using a dashed stroke
    1. Object -> Expand
    2. Object -> Compound path -> Make

    Translate
    Participant
    Mar 15, 2018 3:52 PM UTC

    only with blend option....after expand.

    Translate
    Participant
    Jan 10, 2018 2:24 AM UTC

    I know this is an old post. Just to share my method. I found the best solution for this problem :

    1- create a single line i.e. 12pt long 1pt thick

    2- make a pattern brush from the line

    3- In pattern brush options dialog box, put 50% in spacing box.

    4- apply the pattern brush to your desired shape.

    5- you can still adjust the gaps in spacing box and hit apply to stroke

    6- You can also change stroke weight !

    7- go to object -> expand appearance.

    Done !

    Hope this will help.

    - Tolyn

    Translate
    valeriu28
    Participant
    Feb 6, 2018 9:10 AM UTC

    This is the best solution! Thank you.

    Translate
    aDuli
    Participant
    Jan 15, 2016 8:47 AM UTC

    Make a line for example 5mm --> make a pattern brush from line. Select the the other line and apply the brush on it. After this at Stroke menu apply a dashed line and last expand appearance.

    Translate
    Participant
    Apr 21, 2015 2:36 PM UTC

    It's somewhat of a PITA if you have a complex shape with lots of dashes, but I figured out how to do this:

    Start with your dashed line:

    Copy and past the line in front so it's in the exact same spot
    Turn it back into a solid line (I like to change the color to make it easier to see) and send it to the back:

    Outline the stroke of the dashed line only, select both objects, and then in the Pathfinder menu, choose "Outline" (the second to last option):

    Go into isolation mode (or ungroup) and select all the lines you want, cut them, delete the ones you don't need then paste the lines you want back in:

    You now have lots of separate vector lines that form one large dashed line:

    Translate