Subasic, 33, excelled for Croatia at the 2018 World Cup - playing a key role in their route to the final of the competition.
The stopper, who has earned 44 caps for the national team, revealed that he made the decision to retire before this summer's tournament had started.
"After 10 years, it's time for me to retire from my favourite jersey," Subasic said in a statement. "I made my decision before the World Cup because I wanted to finish my career playing at the World Cup, which was my dream.
"We all have an expiry date, and need to assess how long we can play. Maybe I could have lasted one more campaign, but that would probably be too much.
"In this manner, I want to allow my teammates, who are waiting for their chance like I did, to make their dreams come true, and play for Croatia. They are Croatia's future.
"I have given my all, with honour and pride in every match. Maybe there weren't too many, but that's less important. What's important is that I am a fulfilled, happy man who played for his country and wore the most beautiful shirt in the world."