Williams enjoyed a successful loan spell at Championship side Ipswich Town towards the end of last season, after struggling to break into the first team at Selhurst Park.
Ipswich boss Mick McCarthy has already shown interest in taking the midfielder back to Portman Road, and the 20-year-old admitted he may have to consider a move away from Palace to seek first-team football.
"I spoke to my agent who says (Swansea) were interested," said Williams. "I need to play football, preferably at Palace, but if not I'd have to consider playing elsewhere.
"It's hard to think about (leaving) because I've been there for so long. If I can get in the team at Palace, that's the main thing.
"But I need to play football at Palace, and I wasn't last year because I ended up going on loan.
"Swansea are a great team. They've shown over the last few years that they can do it at the top level.
"I haven't heard much personally about if anything's been offered, but I'm sure I'll know more about it in the next few weeks."