Citigroup was hit with the highest fine of 310.8 million euros, while Swiss bank UBS was not fined as it had alerted the two cartels to the European Commission.
"These cartel decisions send a clear message that the Commission will not tolerate collusive behaviour in any sector of the financial markets," European Competition Commissioner Margrethe Vestager said in a statement.
The EU competition enforcer said most of the traders knew each other on a personal basis and set up chatrooms such as "Essex Express 'n the Jimmy", which was given this name because all of them except "James" lived in Essex, to the east of London, and met on their train commute to the British capital.
The five-year investigation found nine traders spread across the banks exchanged sensitive information and trading plans in the chatrooms and occasionally co-ordinated trading strategies.
"The traders, who were direct competitors, typically logged in to multilateral chatrooms ... and had extensive conversations about a variety of subjects, including recurring updates on their trading activities," the Commission's statement said.
The "Essex Express" cartel, which also involved a chatroom called "Semi Grumpy Old Men", ran between December 2009 and December 2012. The second cartel - called "Three Way Banana Split" and involving other chatrooms named "Two and a half men" and "Only Marge" - ran from December 2007 until January 2013.
Information traders swapped in the chatrooms included information on their clients' orders, the bid-ask spreads for specific transactions, their open risk positions and other details of current or planned trading activities.
Occasionally the traders would co-ordinate trading activity, for example through a practice called 'standing down' whereby some of the group would temporarily stop trading to avoid interfering with others, the commission said.
JP Morgan and RBS both said they were pleased to have settled the cases and that they had since made changes to their controls.
JP Morgan said it related to the conduct of one former employee and RBS that it served as a reminder of how it had lost its way in the past.
MUFG said it had also taken measures to prevent a re-occurrence.
Barclays and Citigroup declined to comment.
The "Three Way Banana Split" cartel, made up of traders at UBS, Barclays, RBS, Citigroup and JP Morgan, was handed a fine totalling 811.2 million euros.
The Essex Express group involving UBS, Barclays, RBS and MUFG, was fined a 257.7 million euro fine, with the fine against Barclays the largest for this cartel at 94.2 million euros.
Allegations of widespread manipulation in the spot foreign exchange market were first reported in 2013 following the Libor scandal in 2012 where traders were found to have been rigging the setting of interbank lending rates.
U.S. and British authorities have since fined seven of the world's top banks a total of around $10 billion for trying to manipulate foreign exchange rates.
Meanwhile, U.S. prosecutors have charged a handful of former traders over forex-rigging. Three former London-based currency traders were acquitted of all charges last October, although others await sentencing after convictions.
The UK Serious Fraud Office (SFO), meanwhile, dropped its own forex investigation in 2016, saying there was insufficient evidence for a realistic prospect of conviction of individuals. ($1 = 0.8923 euros)
(Reporting by Foo Yun Chee, additional reporting by Sinead Cruise and Kirstin Ridley in London; writing by Rachel Armstrong; editing by Philip Blenkinsop and Alexander Smith) ((email@example.com; +32 2 287 6844; Reuters Messaging: firstname.lastname@example.org))