Asked if GCHQ could guarantee it does not operate beyond UK law, Sir Iain Lobban replied: "I can give you that guarantee. I believe that to be true. We are subject to the law."
Some work that GCHQ carries our is "necessarily secret," Sir Iain Lobban said.
"I don't think secret means unaccountable in any sense."
"I don't think secret means sinister," he added.
"We do not spend our time listening to the telephone calls or reading the emails of the majority," GCHQ boss Sir Iain Lobban told the committee.
GCHQ boss Sir Iain Lobban listed current key cyber threats: industrial espionage, terrorists, hacktivists, highly-sophisticated criminal actors, non-state actors, and "engagement by some states as an over-the-horizon means of disruption."
MI5 has disrupted 34 terrorist plots "at all sizes and stages" since the 7/7 bombings in London in 2005, Andrew Parker told the committee.
"The vast majority come from people who live here."
"Terrorist tourism" is growing, especially to places like Syria, MI5's Andrew Parker has told the committee.
Britons in their "low hundreds" have gone to Syria to align with Al-Qaeda-affiliated groups operating there, he said.
Sir John Sawers told the committee that if any of Britain's security agencies were unsure about a decision, "we would wake up the Foreign Secretary in the middle of the night".
"With the benefit of hindsight we were not configured in 2001 for the scale of terrorism this country faced after 9/11," Sir John Sawers told the committee.
"It took us some time to adapt to the scale of the threat that we face."
MI5 boss Andrew Parker said all three security agency directors are in discussions about the number of US security staff who appear to have access to British secrets, as NSA whistleblower Edward Snowden did.
GCHQ director Sir Iain Lobban told the committee that the internet gives terrorists "a myriad of ways to work covertly" as well as platforms for fundraising and recruiting.