Sign up ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Just when I generated a GUID, I found some hyphens in between the character and also at specified intervals


Is there any story behind this?

Note: My intention is to remove those hyphens as I am adding this GUID to a filename and our filename should only be aplhanumeric.

share|improve this question
I think it's for readability. Although I must say it's a very strange placement of hyphens if that's the reason for them... –  gablin Dec 25 '10 at 22:54
A GUID has several fields –  JoelFan Feb 26 at 22:15

2 Answers 2

up vote 12 down vote accepted

The hyphens are always placed at the same position, so you won't lose any information (or unique-ness) by removing them.

See Stack Overflow: Why are there dashes in a .NET GUID? for a detailed explanation.

share|improve this answer

Long sequences are very hard to parse for humans, hence the hyphens. But GUID itself is just a number, so you can drop them.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.