Robert E Crimo III, 22, was detained after a brief chase, police said.
The gunman climbed on to a roof, shooting randomly at spectators using a high-powered rifle.
It is the latest mass shooting to hit the US – there has been one in every week of 2022. President Joe Biden said he was “shocked” by the violence.
Mr Crimo was detained after a manhunt. He was referred to as a “person of interest” in Monday’s shooting, but after his arrest police said they believed he was responsible.
The gunman began firing at members of the public from the rooftop of a shop at around 10:15 local time (15:15 GMT), just a few minutes after the parade began.
What should have been a day of celebration quickly turned to panic, with pushchairs, purses and lawn chairs abandoned as crowds fled from the scene. Some witnesses said they thought the sound of gunfire was fireworks or a car backfiring.
One man, who was having breakfast at a nearby Starbucks when the shooting happened, told the BBC that 30 people came running into the coffee shop looking for cover. But they all had to be evacuated because they thought the gunman was trying to get in through the back door.
Five adults were killed at the scene and one died later in hospital. At least two dozen others were injured.
One of those who died has been named as Nicolas Toledo, a man in his late 70s, who was only there because he requires full-time care and his family did not want to miss the event.
“What was supposed to be a fun family day turned into a horrific nightmare for us all,” his granddaughter Xochil Toledo wrote on GoFundMe.
“As a family we are broken, and numb. Our condolences go out to all the other families who lost a love one today.”
Another victim of the shooting has been named as Jacki Sundheim, who was described by her local synagogue as a “beloved” member who taught and worshipped there.
“There are no words sufficient to express the depth of our grief for Jacki’s death and sympathy for her family and loved ones,” a statement by North Shore Congregation Israel synagogue said.